On 26/07/11 18:24, Demosthenes Koptsis wrote:
> i have a multiline text (a text with emails) in a TextArea
> and i want RegExp to return the list of emails.
>
> How to do this?
>
> i use
>
> ----------------
> Private sRegExp As Regexp
>
> Public Sub Form_Open()
>
>    Me.Center
>
> End
>
> Public Sub btnMatch_Click()
>
>    If IsNull(txtPattern.Text) Or IsNull(txtSubject.Text) Then Return
>
>    sRegExp = New Regexp(txtSubject.Text, txtPattern.Text, 2)
>
>    If sRegExp.Offset = -1 Then Return
>
>    txtResults.Text = sRegExp.Text
>
> End
>
> ----------------
>
> and txtPattern.Text=(?i)\b[a-z0-9._%\-]+@[a-z0-9._%\-]+\.[A-Z]{2,4}\b
>
> but i get only one result, the first one
>
>    
regexp only (ever) works on a line by line basis

------------------------------------------------------------------------------
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
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to