[Gambas-user] Questions for RegExp class

user demosthenesk at ...626...
Tue Oct 12 23:26:09 CEST 2010


Thanks, yes that was it.

On Tue, 2010-10-12 at 21:34 +0200, EA7DFH wrote:
> El 12/10/10 20:47, user escribió:
> > Hi,
> > 
> > i try to implement a regular expression with this code
> > 
> > -----------------------------------------
> >   DIM sRegEx AS Regexp
> > 
> >   sRegEx.Compile("\"")
> >   sRegEx.Exec(Global.txtUpdateOptions)
> > -----------------------------------------
> > 
> > but in line of "compile" i get a NULL object.
> > 
> > why?
> 
> You need to use the NEW keyword to instantiate the sRegEx variable:
> 
> DIM sRegEx AS NEW Regexp
> 
> or
> 
> DIM sRegEx AS Regexp
> sRegEx = NEW Regexp
> 
> 
> http://gambasdoc.org/help/comp/gb.pcre/regexp/_new
> 
> Regards,
> 






More information about the User mailing list