Statalist


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

RE: st: data management - string function


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: data management - string function
Date   Mon, 5 Jan 2009 20:09:24 -0000

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index