how to create expression in xbase++

158 views Asked by At
String GSTINFORMAT_REGEX = "[0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Z]{1}[0-9a-zA-Z]{1}";

I want to create this expression in xbase++. Please tell me how to create this kind of expression. Thanks in advance.

1

There are 1 answers

0
Missy On

Try this:

 GSTINFORMAT_REGEX = "[0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Z]{1}[0-9a-zA-Z]{1}";
 oRegExp = CreateObject("VBScript.RegExp")
 oRegExp.Pattern = GSTINFORMAT_REGEX
 result = oRegExp.test(testphrase)