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: String match(strmatch) for case insensitive
From
Veeresh Thummadi <[email protected]>
To
[email protected]
Subject
Re: st: String match(strmatch) for case insensitive
Date
Mon, 3 Feb 2014 11:59:40 -0500
Hi Nick
It is little tedious as I have some strings which are supposed to be
in Caps by default and some strings are written in different formats.
I was actually trying to create a global macro where in I will list
like 200 strings in which (4 or 5 would be in upper caps (if they are
written in lower caps they mean different things) and 196 might be in
different formats). I need to generate variables based on these
strings using a foreach loop. So I was trying to see if i can do it a
little more efficiently. I guess i need to stick to upper case or
lower case. Thanks for your suggestions
Thanks
Veeresh
Veeresh Thummadi
Research scientist
Stern School of business
New York University
On Mon, Feb 3, 2014 at 11:38 AM, Nick Cox <[email protected]> wrote:
> In what sense "tedious" or in any other way disadvantageous or unattractive?
>
> I can't think of an easier or better way to make comparisons
> insensitive to case than to use -upper()- or -lower()- to put strings
> on the same basis. The alternative would appear to be a regular
> expression that you need to get exactly right.
>
> Nick
> [email protected]
>
>
> On 3 February 2014 16:33, Veeresh Thummadi <[email protected]> wrote:
>
>> I am looking if i can make a strmatch for strings so that it can be
>> case insensitive. I don't want to use the upper or lower case
>> conversion as it appears to be tedious. Is there a way out for case
>> insensitive strings?
> *
> * 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/