Subject | Re: [firebird-support] Extract email addresses from blob via LIST and SIMILAR TO |
---|---|
Author | Michael Ludwig |
Post date | 2010-12-27T17:09:34Z |
Roberto Carlos schrieb am 27.12.2010 um 14:11 (-0200):
SQL's) regular expressions. There are other issues with this expression
in the context of matching email addresses, both in general and with
regard to Firebird. Just forget it.
supported and what isn't.
using isql by doing:
select 1 from rdb$database where 'eins' similar to 'ei%';
--
Michael Ludwig
> In a stored procedure, I extract the words of a blob text in aA Perl-style word boundary (\b) is not supported in Firebird's (or
> variable. Then, I try to test whether that word is an email or not by:
> ---------------
> while ...
> ...
> if (WordVariable similar to
> ('\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b')) then
> Supend;
> ...
> end
SQL's) regular expressions. There are other issues with this expression
in the context of matching email addresses, both in general and with
regard to Firebird. Just forget it.
> This RegEx was taken fromTake a look at the Firebird 2.5 release notes to understand what is
> http://www.regular-expressions.info/email.html
> but does not work in this case.
supported and what isn't.
> Is that regular expression wrong according to Firebird 2.5 rules?Yes, syntactically wrong. You can find that out yourself very easily
using isql by doing:
select 1 from rdb$database where 'eins' similar to 'ei%';
--
Michael Ludwig