Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How can I change Stata's regular expression parser to use Perl's parser, so that I can use perl compatible regular expressions (i.e. the same regular expression syntax that I use with Perl)


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How can I change Stata's regular expression parser to use Perl's parser, so that I can use perl compatible regular expressions (i.e. the same regular expression syntax that I use with Perl)
Date   Mon, 3 Dec 2012 11:56:15 +0000

In your blog entry you note

"for some reason, marksample is not working"

There is a documented reason why -marksample- appears not to work as
you expect. Your -marksample- syntax does not fit your problem. See
-help marksample- for this comment:

-strok- ....  Specify this option if string variables in varlist are
to be allowed.

Nick

On Mon, Dec 3, 2012 at 8:42 AM, Shafique Jamal <shafique.jamal@gmail.com> wrote:
> Dear Nick, many thanks for your reply. I followed your suggestion and
> wrote a state .ado program to call a perl script to perform perl
> compatible regular expressions on variables, and generate variables
> indicating the results an storing named captures/groups.
>
> In case anyone is interested, the perl script and stata program are at:
>
> http://shafiquejamal.blogspot.com/2012/12/stata-tip-using-perl-compatible-regular.html
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index