Hi y'all. Been a while.
Found a problem with Stata's regular expression parser. It doesn't
handle escapes (\'s) correctly. Was doing this while writing a regular
expression to verify a valid varlist in a very non-standard syntax
parser.
di regexm("(id1-2)", "\([\-0-9]*\)")
The \-\0-9 in the [] should match numbers (0-9) and dash ("-"), but
reads the escaped dash as another range operator. The specific error
is
regexp: invalid [] range
If anyone has a hack to obtain an equivalent regexp, or if Stata has
any comments, gratitude in advance.
Cheers
James
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/