Subject Re: [firebird-support] Extract email addresses from blob via LIST and SIMILAR TO
Author Roberto Carlos
In a stored procedure, I extract the words of a blob text in a 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
---------------

This RegEx was taken from http://www.regular-expressions.info/email.html but does not work in this case.

The emails I am trying to test are:
xxx@...
xxx@...
xxx@...
xxx@...
xxx@...
xxx@...

Is that regular expression wrong according to Firebird 2.5 rules?

Thanks.


Em 14/12/2010 16:03, Roberto Carlos < rc.1990@... > escreveu:

Is there any way (function, procedure, UDF, etc) in Firebird, Delphi, PHP or Java to extract email addresses from a long text?

Thanks to all kind of help.

Roberto Carlos

Em 06/12/2010 15:30, Roberto Carlos < rc.1990@... > escreveu:

> In Firebird 2.5, I have a blob sub_type text field that have very large text containing many email addresses.
> For example:
> 'aaa bbb ccc. ddd eee fff ggg@..., hhh iii jjj@.... Kkk lll mmm@...; nnn'
>
> How could I use LIST and SIMILAR TO to extract many email addresses form this blob field?
>
> Thanks to all kind of help.
>