Re: Cannot even come up with the beginning of a regex
| From: | Dotan Cohen | Date: | Thu, 28 Feb 2008 19:31:50 +0000 |
| Subject: | Re: Cannot even come up with the beginning of a regex | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270638@lists.php.net to get a copy of this message | ||
Alright, now that I've confirmed that preg_replace can work with
UTF-8, I'm back to my original regex:
$test="כאכ כ ככ ח";
$test=preg_replace(
'/\bכ/u'
,
'ך'
, $test);
print $test;
print "<pre dir=\"rtl\">$text</pre>";
This _should_ change the letter "כ" to "ך" only if it is at the end of
a word. Can anyone push me in the right direction as to why that is
not happening?
Thanks for any and all advice.
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?