[Gambas-user] Questions for RegExp class

EA7DFH ea7dfh at ...2382...
Tue Oct 12 21:34:30 CEST 2010


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,

-- 
Jesus, EA7DFH




More information about the User mailing list