REGEX question

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Jul 9 23:51:17 CDT 2006


On 7/9/06 10:04 PM, "jda" <jda at his.com> wrote:

>>>>>  tab
>>>>>   file1 return
>>>>>   file2 return
>>>>>   file3
>>>>> 
>>>>>   I'm doing a REGEX search that should find ONLY complete matches. I
>>>>>   can match the beginning, but so far can't find a pattern that matches
>>>>>   the end. Here's what I have:
>>>>> 
>>>>>   select * from theTable WHERE varCharField REGEX '(?i)[\t|\r]ruslan.pdf'
>>>> 
>> 
>>> and it finds the text.
>> 
>> I think you should do
>> 
>>     REGEX '\Aruslan.pdf\Z'
>> 
> 
> I thought that, too, but it doesn't work. Here is what works so far:
> 
> REGEX '(?i)[\r\t]ruslan.pdf
> 
> This finds only lines beginning with ruslan.pdf
> 
> But I can't get the end-of-line to work if it's the last character in
> the field. I thought this would work:
> 
> '[\r\t]ruslan.pdf\Z'
> 
> but it doesn't (I get no hits if I include the \Z).

Again, you try to incorporate \r

Usually REGEX -- DO NOT work on few lines !!!

For example, in BBEdit, as I remember, exists some special option to force
do that.

I think that instead of [\t|\r] you need use
    \A or ^  -- start of line



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina-beta mailing list