On Wed, Jul 27, 2011 at 5:34 PM, Demosthenes Koptsis
<[email protected]> wrote:

> 2) The Pattern i use is:
> (?i)\b[a-z0-9._%\-]+@[a-z0-9._%\-]+\.[A-Z]{2,4}\b
>
> 3) The result is only one email:
> [email protected]
>
> and not the rest of them.
as you are only calling regexp once, you will only get one result, you
need to set up a While..Wend loop
to go through and find one, then use
Right$(-(Len(sRegExp.Text)+sRegexp.Offset)) to grab the reminder
of the string as search that, until the search fails.

This is inefficient (as a new string is created for each search).
Benoit, is it possible for Regexp.Exec to have an offset parameter,
this would allow more
efficient searching loops.
It would then be possible to write an iterator to grab all occurances
of a regexp, and make it 'easy' like in Ruby/Perl.

Ian

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to