REGEX search for whole line

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Jun 22 01:24:51 CDT 2007


On 21/6/07 9:51 PM, "jda" <jda at his.com> wrote:

>> LIKE and REGEX can use INDEX SCAN if they see that operation is analog of
>>     START WITH.
>> 
>> 
>> I have to think more. May be you need it as
>> 
>>    ...WHERE fld REGEX '.*^second line$.*'
>> 
>> Because in your case it sounds FROM START to END,
>> But you want find such line that have OTHER text around.
>> 
> 
> Hm, that doesn't work, I'm afraid.
> 
> Yes, basically I have a list of terms (e.g. names). Each record can
> have many names in a field, and are kept as a return-delimited string:
> 
> Smith, JD
> Jones, RR
> Wilson, K
> 
> When the user clicks on a name in a list, I want to display the
> record. So I may need to do a search for a name that's at the
> beginning, middle, or end.
> 
> I can do this with a combination of Valentina and RB commands, but it
> would be much neater if a simple REGEX search would always identify a
> record (and it can't be "beginning with", because 'Wil' should not
> match with 'Will').

REGEX always have issues with RETURN.

Take any text editor, e.g. BBEdit, and try get REGEX which search for
RETURNS or jump over RETURNs. Hard.

May be you can do 

    LIKE 'RETURNJones, RRRETURN'

Build this string in RB itself.

Also try right in the SQL this:
    LIKE '\rJones, RR\r'

May be parser will eat it correctly.


-- 
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 mailing list