>select
>iif('[email protected]' similar to
>'([_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+)','ok','fail')
>from rdb$database
>
>Says 'invalid string' and 'invalid pattern', but the pattern it´s the same in
>other languages for validate email address.
I know nothing about regular expressions, but
http://www.firebirdsql.org/refdocs/langrefupd25-similar-to.html#langrefupd25-similar-to-building-regexps
says "There is no default escape character; rather, the user specifies one when
needed:"
and then gives four examples:
'Peer (Poire)' similar to 'P[^ ]+ \(P[^ ]+\)' escape '\' -- true
'Pera [Pear]' similar to 'P[^ ]+ #[P[^ ]+#]' escape '#' -- true
'Päron-Äppledryck' similar to 'P%$-Ä%' escape '$' -- true
'Pärondryck' similar to 'P%--Ä%' escape '-' -- false
HTH,
Set