Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-29 Thread Dotan Cohen
I finally solved the problem, after ditching the /b argument in preg_replace It seems that Hebrew letters are not part of a word, so far as /b is concerned. Here is the code for converting Hebrew final letters in the middle of a word to normal letters, if anyone ever needs it: $text="עברית מבולגנת

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-28 Thread Dotan Cohen
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 "$text"; This _should_ change the letter "כ" to "ך" only if it is at the end of a word. Can anyone push me in

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-28 Thread Zoltán Németh
2008. 02. 28, csütörtök keltezéssel 11.23-kor Dotan Cohen ezt írta: > On 28/02/2008, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > > Thank you very much, Zoltan. Is there a known UTF-8 limitation? > > > Because it works fine for me in English letters (well, the opposite of > > > what I needed but

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-28 Thread Dotan Cohen
On 28/02/2008, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > Thank you very much, Zoltan. Is there a known UTF-8 limitation? > > Because it works fine for me in English letters (well, the opposite of > > what I needed but I was able to work with it as which polar I start > > with was arbitrary),

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-28 Thread Dotan Cohen
On 28/02/2008, Casey <[EMAIL PROTECTED]> wrote: > > Thank you very much, Zoltan. Is there a known UTF-8 limitation? > > Because it works fine for me in English letters (well, the opposite of > > what I needed but I was able to work with it as which polar I start > > with was arbitrary), but

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-28 Thread Zoltán Németh
2008. 02. 28, csütörtök keltezéssel 00.02-kor Dotan Cohen ezt írta: > On 27/02/2008, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > > > sorry that's messed up a bit, as I typed it right here in my mailer ;) > > > > preg_replace('/\b([^\s]+)a\b.*/U', '$1A', 'whatever i want that hasa a > > on the en

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-27 Thread Casey
2008/2/27 Dotan Cohen <[EMAIL PROTECTED]>: > On 27/02/2008, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > > > sorry that's messed up a bit, as I typed it right here in my mailer ;) > > > > preg_replace('/\b([^\s]+)a\b.*/U', '$1A', 'whatever i want that hasa a > > on the end'); > > > > gree

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-27 Thread Dotan Cohen
On 27/02/2008, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > sorry that's messed up a bit, as I typed it right here in my mailer ;) > > preg_replace('/\b([^\s]+)a\b.*/U', '$1A', 'whatever i want that hasa a > on the end'); > > greets > > Zoltán Németh > Thank you very much, Zoltan. Is there a kn

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-27 Thread Zoltán Németh
2008. 02. 27, szerda keltezéssel 13.51-kor Zoltán Németh ezt írta: > 2008. 02. 27, szerda keltezéssel 12.46-kor Dotan Cohen ezt írta: > > Hi all, it's been a while since I've written with a regex problem. > > This time, I'm stumped. > > > > I've got some text that needs to have five letters, if fo

Re: [PHP] Cannot even come up with the beginning of a regex

2008-02-27 Thread Zoltán Németh
2008. 02. 27, szerda keltezéssel 12.46-kor Dotan Cohen ezt írta: > Hi all, it's been a while since I've written with a regex problem. > This time, I'm stumped. > > I've got some text that needs to have five letters, if found not at > the end of a word, to be replaced with different letters. For >

[PHP] Cannot even come up with the beginning of a regex

2008-02-27 Thread Dotan Cohen
Hi all, it's been a while since I've written with a regex problem. This time, I'm stumped. I've got some text that needs to have five letters, if found not at the end of a word, to be replaced with different letters. For instance, should the letter "a" be found at the end of a word, leave it alone