i used also Multiline http://gambasdoc.org/help/comp/gb.pcre/regexp/multiline?v3
and DotAll http://gambasdoc.org/help/comp/gb.pcre/regexp/dotall?v3 with this code ------------------------- ' Gambas class file Private sRegExp As Regexp Public Sub Form_Open() Me.Center End Public Sub btnMatch_Click() txtResults.Clear If IsNull(txtPattern.Text) Or IsNull(txtSubject.Text) Then Return sRegExp = New Regexp(txtSubject.Text, txtPattern.Text, 4) If sRegExp.Offset = -1 Then Return txtResults.Text = sRegExp.Text End ------------------------- 1) The Subject of RegExp is: Here is an email di...@yahoo.gr and text continues Here is an email kos...@yahoo.gr and text continues Here is an email pet...@yahoo.gr and text continues Here is an email p...@yahoo.gr and text continues 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: di...@yahoo.gr and not the rest of them. 4) if i convert this pattern to grep syntax in terminal, grep gives all 4 emails. i want to implement a grep like funtcion with Gambas3 Thanks! On Wed, 2011-07-27 at 12:45 +1000, Ian Haywood wrote: > On Wed, Jul 27, 2011 at 8:34 AM, Bruce Bruen <bbr...@paddys-hill.net> wrote: > > regexp only (ever) works on a line by line basis > by default yes, but: > http://gambasdoc.org/help/comp/gb.pcre/regexp/dotall > > this makes the . cover newlines, so a regexp can span multiple lines > in the string. > > 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 > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Regards, Demosthenes Koptsis. ------------------------------------------------------------------------------ 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