Subject | Re: [firebird-support] Why this similar to is wrong? |
---|---|
Author | Walter R. Ojeda Valiente |
Post date | 2014-11-25T15:21:32Z |
Yet more simple:
Greetings.
Walter.
On Tue, Nov 25, 2014 at 10:48 AM, Walter R. Ojeda Valiente <sistemas2000profesional@...> wrote:HelloI use the following SELECT when want to validate an e-mail address and works fine for me:SELECTIIF('email@...' SIMILAR TO '[[:ALNUM:]-*_*.*]*@[[:ALNUM:]-*_*.*]*.[[:ALNUM:]-*_*.*]*', 'ok', 'fail')FROMRDB$DATABASEOf course, that is not perfect, but works.Greetings.Walter.On Tue, Nov 25, 2014 at 9:29 AM, sirhamacker@... [firebird-support] <firebird-support@yahoogroups.com> wrote:select
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.