REGEX search for whole line

erne ernestogiannotta at tiscalinet.it
Fri Jun 22 02:29:10 CDT 2007


Hello Jon,

take a look at this:

(?m)    Caret and dollar match after and before newlines for the remainder
of the regular expression. (Older regex flavors may apply this to the entire
regex.)

from:

http://www.regular-expressions.info/reference.html

so maybe try:
WHERE fld REGEX '(?m)^second line$'


HTH


on 21-06-2007 20:51, jda at jda at his.com wrote:

>> 
>>> Yes, they are. But REGEX ignores indices, no?
>> 
>> Not always.
>> 
>> 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').
> 
> Jon
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina

Cool Runnings,
Erne.
-- 

/ |\ |\  | /
­ |/ | \ | ­
\ |\ |  \| \




More information about the Valentina mailing list