Dear Statalists,
I want to delete everything in different parentheses for a string variable. I found this topic :http://www.stata.com/statalist/archi.../msg00312.html
However, the code there will delete all information after the first bracket is found. Meanwhile, my string variable (Info) is like this:
I want to remove all additional information in the parentheses for Info variable before splitting that variable by comma ","
Could anyone help me with this?
Thank you very much!
I want to delete everything in different parentheses for a string variable. I found this topic :http://www.stata.com/statalist/archi.../msg00312.html
However, the code there will delete all information after the first bracket is found. Meanwhile, my string variable (Info) is like this:
ID | Info |
1 | carrot 4% (eating and growing), banana 6%, apple (eating, growing, etc.) 10%, orange 5% |
2 | banana 5% |
3 | pineapple 10% (not including xxx), others 5% |
Could anyone help me with this?
Thank you very much!
Comment