Hello,
I have variable that looks like
Experience
('Santo Engineering', '2017-04-30', '2017-05-30', '')('Standard Drum and Bucket Factory', '2019-06-01', '2019-07-01', '')('Team Eclipse Racing', '2020-06-15', '2021-05-08', '')
('nA', '2021-07-01', '2021-07-02', '')
('One Hour Translation', '2021-09-08', '2021-09-14', '')
('Acc Cement', '1996-03-17', '', 30.0)
('Check N Click Learning and Technologies', '2021-07-18', '', 1.0)('No work any organisation ', '2021-07-18', '2021-07-18', '')
Each successive () represents the past experience details of a person, expressions within the parentheses contain: company, start date, end date, months
I would like to extract each string within parenthesis with first parenthesis getting variables named as e1_com, e1_sd, e1_ed, e1_m and if there are more than one parenthesis then the information contained in the second parenthesis should be stored in e2_com, e2_sd, e2_ed, e2_m and so on.....
Will appreciate any help on this. I think regular expressions should resolve this, but unable to figure this one out.
Thanks!
K
Related Posts with Separating string variable with parenthesis and commas
Exit Stata after run do-fileHi! I'm running a Python code that opens Stata and runs a do-file. After the do-file is run I would …
Filling in Values in Panel Data Above and Below with Unique OrdersDear Stata Users, I am in the process of cleaning data on historical greenhouse gas emissions. Sinc…
Missing value fill-in with data from specific datesI have data on migration numbers between countries and their neighbors. The issue is that the data i…
Univariate Evidence using t-statHello Stata Community, i have the attached dataset and I want to give an descriptive statistics ove…
Some curious features of tests in Stata with interactionsWhile preparing teaching material for my undergrads I noticed a peculiar, not to say undesirable, fe…
Subscribe to:
Post Comments (Atom)
0 Response to Separating string variable with parenthesis and commas
Post a Comment