REGEX \ search

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jul 20 15:24:36 CDT 2005


On 7/20/05 3:17 PM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

And more Jon,

In 2.0.5fc3 we have simplify a lots Valentina.EscapeString() !

Now it escapes only ' and \

Parameter inForRegEx now is not used. It will be deprecated.
This was mistake that come from v 1.x

I assume you have own function that do escape.
Now it is not needed. Please try to use our and let me know.

 
> ----------------------------------------
> Starting from 2.0.5 manual query must look as
>  
>     select id,hit from thereferences where allFields LIKE '%\\\\%'
> or 
>     select id,hit from thereferences where allFields REGEX '(?i)\\\\'
>  
> In your application user must type:
>     select id,hit from thereferences where allFields LIKE '%\\%'
>     select id,hit from thereferences where allFields REGEX '(?i)\\'
> 
> and after you use Valentina.EscapeString() you will get required
> query with 4 symbols back slash.
> ----------------------------------------
> 
> Where you see problems?
> 
> You user in your Application must enter string to do REGEX search.,
> User know that he is doing REGEX search, right ?
> 
> If I want in CodeWarrior do search on strings that have \
> I type in the search dialog of CodeWarrior
> 
>                    \\
> 
> The same I will expect todo in YOUR application.
> THE SAME will do any your user who know REGEX.
> 
> Then you get from Edit field string "\\"
> And you do next:
> 
>     q = "select id,hit from thereferences where allFields REGEX '(?i)"
>     
>     q = q + Valentina.EscapeString( regexEditField.text )
> 
>     q = q + "'"
> 
> So you get the correct query:
> 
>     select id,hit from thereferences where allFields REGEX '(?i)\\\\'

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