REGEX question
jda
jda at his.com
Sun Jul 9 18:11:43 CDT 2006
> >> 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
>
>
No, I did get it to work on multiline text. But I had to do my own OR
to get it right:
WHERE varCharField REGEX '[\r\t]ruslan.pdf$' -- works if end of field
OR
WHERE varCharField REGEX '[\r\t]ruslan.pdf\r' -- works if line ends
in a return char
I tested this a fair amount and it seemed to work pretty well.
Thanks.
Jon
More information about the Valentina-beta
mailing list