Statalist


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

RE: st: data management - string function


From   Howard Lempel <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: data management - string function
Date   Mon, 5 Jan 2009 15:18:10 -0500

And I always thought it was called a carrot because it was shaped like the vegetable . . .

Thanks for the correction, Nick.

Howie


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: Monday, January 05, 2009 3:09 PM
To: [email protected]
Subject: RE: st: data management - string function

Howard's typo here may confuse a few. On carrots, carets, carats, etc.
see e.g. 

<http://www.wsu.edu/~brians/errors/carat.html> 

While I'm at it, let's recall the physicist R.W. Wood (fl.1900) 

The Parrot and the Carrot

The Parrot and the Carrot we may easily confound,
They're very much alike in looks and similar in sound,
We recognize the Parrot by his clear articulation,
For Carrots are unable to engage in conversation.

The cartoon that goes with this poem is worth hunting down. 

Nick 
[email protected] 

Howard Lempel

BW, carrot (^) tells Stata you are searching for characters at the
beginning of a string only, so you probably want something to the effect
of:

Gen var2 = regexr(var1,^("MR" | "MR." | "Mr" | . . .),)  


*
*   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index