*Dear all,
I've the following parsing problem in writing one of my ado's:
I need that option's argument be returned just as the user typed them,
with quotes and with leading and trailing blanks. So, I use:
*
prog define example
syntax, OPTION(string asis)
*and when I type:*
example, option(1 "example")
*I get what expected, that is:*
di `"`option' " '
1 "example"
*Then I perform some tasks. At some point of the code I need to strip
off double quotes from the local option. I tried without success with:*
1) local new_option: subinstr local option """ "", all
2) local new_option = regexr(`"`option' " ', """, "")
3) local new_option: list clean option
*Can someone help me?
thx
Federico
*
--
Federico Belotti
Faculty of Economics
Department of Financial and Quantitative Economics
Tor Vergata University
tel: +39 06 7259 5624/25
e-mail: [email protected]
*
* 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/