Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: special characters for regex
From
László Sándor <[email protected]>
To
[email protected]
Subject
st: special characters for regex
Date
Thu, 29 Aug 2013 18:08:47 -0400
I burnt myself with these, I regret my incomplete testing. So, for
others to know:
Though Stata help says "Regular expression syntax is based on Henry
Spencer's NFA algorithm, and this is nearly (sic!) identical to the
POSIX.2 standard." the POSIX.2 standard for special characters (like
[:digit:] for \d or [:space:] for \s, or either with double
bracketing) does not work. Worse, they don't produce an error, just
assume they want to look for the characters between the brackets, and
for some reason you listed colons twice.
There seems to be no substitute but to use listing between brackets. Sigh.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/