Replacing LIKE with REGEX doubts

Stan Busk maxprog at mac.com
Thu Nov 24 17:32:59 CST 2005


Hi,

Am I right if I continue using LIKE this way?:

     Is equal to: myField LIKE 'mytext'
Is not equal to: myField NOT LIKE 'mytext'
        Contains: myField LIKE '%mytext%'
Doesn't contain: myField NOT LIKE '%mytext%'
     Starts with: myField LIKE '%mytext'
       Ends with: myField LIKE 'mytext%'

Is new Valentina 2 LIKE case insensitive? or is it case sensitive?
What characters do I need to escape, the '%', '_' and '/' ?
Is it faster than REGEX? Right now it looks easier.

Stan

> Hi,
>
> Just wondering some of the Valentina v1 LIKE equivalents using v2  
> REGEX of
>
>     Is equal to: myField LIKE '\Amytext\Z' no_case
> Is not equal to: myField NOT LIKE '\Amytext\Z' no_case
>        Contains: myField LIKE 'mytext' no_case
> Doesn't contain: myField NOT LIKE 'mytext' no_case
>     Starts with: myField LIKE '\Amytext' no_case
>       Ends with: myField LIKE 'mytext\Z' no_case
>
>
> are they?:
>
>
>     Is equal to: myField REGEX '(?i)mytext'
> Is not equal to: ???
>        Contains: myField REGEX '(?i)[a-zA-Z0-9]+mytext[a-zA-Z0-9]+'
> Doesn't contain: ???
>     Starts with: myField REGEX '(?i)[a-zA-Z0-9]+mytext'
>       Ends with: myField REGEX '(?i)mytext[a-zA-Z0-9]+'
>
> If I am right with [a-zA-Z0-9]+ is there something better and  
> wider? I mean that could consider more possible characters?
>
> TIA,
> ~/Stan
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list