Subject | RE: [firebird-support] Why this similar to is wrong? |
---|---|
Author | Svein Erling Tysvær |
Post date | 2014-11-25T14:38:02Z |
>selectI know nothing about regular expressions, but http://www.firebirdsql.org/refdocs/langrefupd25-similar-to.html#langrefupd25-similar-to-building-regexps
>iif('email@...' 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.
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