[Mono-list] Regex question

Carlos Guzmán Álvarez carlosga@telefonica.net
Wed, 18 Feb 2004 13:48:44 +0100


> I think that Carlos wants to ignore the @ inside quotes. Here's the proposed
> solution:

Correct, until now i was using:


but it's not always valid and if i can i want to fix it :)

> The regex consists of 3 parts:
> first part (optional) matches a quote followed by a sequence of characters
> including @ and terminated by a quote. This is used to kill quoted @.
> the second part matches any sequence of characters other than a quote or
> "at" sign the third part matches @ followed by a word.

Thanks !! Seems to be valid, but not always, seems that it's going to be 
a little difficult to do this using regex :P

For example in this case fails:

select * from test where int_field = @int_field and char_field = 

It prints:

match 0 is @int_field
match 1 is @telefonica

Best regards

Carlos Guzmán Álvarez