|Subject||Re: [firebird-support] Why this similar to is wrong?|
Well, just a couple of general observations:
iif('email@...' similar to '([_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+)','ok','fail')
Says 'invalid string' and 'invalid pattern', but the pattern it´s the same in other languages for validate email address.
- there is no such thing as a regular expression that can validate an email address, at best you can get an approximation that works "quite often" but still gets it wrong sometimes
- there are dozens of languages all with slightly different rules for regular expressions, it's not a surprise if any non-trivial regular expression needs changing between languages, you just have to read the rules for the new language.
-- Tim Ward