Regular Expression question

Ron runrevron at gmail.com
Fri Mar 13 09:12:05 EDT 2009


Hi Kenji, Mark,

Thanks for your suggestions.
Kenji, you are right about searching using the find command. I can  
search for Kanji, as you do in your stack.
Mark, you are right about escaping the characters when I use regex.   
I've have been escaping the chars and that seems to work in the case  
where there are no reg expressions - only the kanji.

My problem is identifying and converting the kanji in the regex string  
that I put into matchtext.

for example: "love\w\w" finds among other things, loved, lovely, loves  
etc. Regex parses this expression fine so I can have the user input it  
directly. But if I use Kanji: "土.{1,10}水" it does not work.
This is the kanji for land followed by a period followed by the match  
operator followed by the kanji for water. I'm looking for the first  
kanji separated from the second by 1 to 10 chars.

It seems I need to let regex know I'm using kanji and there must be  
some way to do so, unless Rev does not support that.

Thanks
Ron


On Mar 13, 2009, at 9:31 PM, Kenji Kojima wrote:

> Ron,
>
> I made a  Japanese search field before. I don't know what the regex  
> is, but the search field works in Japanese and English on Rev3.0.
>
> go stack url "http://www.kenjikojima.com/runrev/handbook/download/JpSearchFld.rev 
> "
>
> Try it,
> --
> Kenji Kojima
> http://www.kenjikojima.com/
>
>
>
>
>> On 13 mrt 2009, at 10:44, ron barber wrote:
>>
>>> Hi,
>>> I'm trying to use regex for searching unicode text in Rev. The docs
>>> say that Rev follows pcre rules and I've tried various  
>>> combinations or
>>> \N, \x but unsuccessfully. Can someone offer a way to do this or
>>> confirm that Rev does not support regex for unicode?
>>>
>>> I am working with utf 8 (Greek etc) and  utf 16 (Japanese etc)
>>>
>>> Thanks so much,
>>>
>>> Ron
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list