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

-- 
Regards,
Demosthenes Koptsis.


------------------------------------------------------------------------------
Magic Quadrant for Content-Aware Data Loss Prevention
Research study explores the data loss prevention market. Includes in-depth
analysis on the changes within the DLP market, and the criteria used to
evaluate the strengths and weaknesses of these DLP solutions.
http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to