[Gambas-user] Multiline RegExp

2011-07-26 Thread Demosthenes Koptsis
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

[Gambas-user] Inbuilt function to check if a string contains a valid number

2011-07-26 Thread vikram
Hi, Is there an inbuilt function in Gambas 2 (2.21) to check if a string contains a valid number? Thanks, Vikram Nair -- Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss

Re: [Gambas-user] Inbuilt function to check if a string contains a valid number

2011-07-26 Thread BenoƮt Minisini
Hi, Is there an inbuilt function in Gambas 2 (2.21) to check if a string contains a valid number? Thanks, Vikram Nair No, but you can do that: DIM MyNumber AS Float TRY MyNumber = Val(MyString) IF ERROR THEN PRINT Not a valid number In Gambas3, IsNumber() does what you want. But not

Re: [Gambas-user] Multiline RegExp

2011-07-26 Thread Bruce Bruen
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

Re: [Gambas-user] Multiline RegExp

2011-07-26 Thread Ian Haywood
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