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]
Re: st: special characters for regex
From
László Sándor <[email protected]>
To
[email protected]
Subject
Re: st: special characters for regex
Date
Fri, 30 Aug 2013 07:13:02 -0400
Thanks, Steve.
FWIW, I think it is a bit misleading to claim being nearly identical
to a standard when there are all these differences. I would not say
that not supporting [:space:] is really about a shorthand here. I do
not even know which whitespace characters could be covered by the
term, esp. as all those are special characters. Or it would be nice if
Stata warned me about trying to use a regex expression they will not
parse…
On Thu, Aug 29, 2013 at 8:24 PM, Steve Samuels <[email protected]> wrote:
>
> See: http://www.stata.com/statalist/archive/2005-09/msg00364.html
>
> Steve
>
> On Aug 29, 2013, at 6:08 PM, László Sándor wrote:
>
> 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/
>
>
> *
> * 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/
*
* 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/