Bookmark and Share

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: browse if regexm(make,".")


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: browse if regexm(make,".")
Date   Tue, 29 Mar 2011 14:59:14 +0100

... because . has a particular meaning as a regular expression. If you
want to search for literal dots you must specify "\.". -- or use
-strpos(make, ".").

Nick

On Tue, Mar 29, 2011 at 2:54 PM,  <[email protected]> wrote:

> Actually, I have this problem as well:
>
> ****
> sysuse auto
> browse if regexm(make,"A")==1        // it lists all string variables with a "A"
> browse if regexm(make,".")==1        // it lists everything instead of just the obs with a dot(".")
> ****

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index