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
Cluster analysis with longitudinal dataAre there commands in Stata that are similar to the kml3d package in R (see e.g. Genolini et al 2015…
Regress y on each variable each timeHi, I want to run regressions in the following way: reg y x1 i.year i.ind reg y x2 i.year i.ind re…
Generate a week from a data and "xtset" the dataDear Stata Users, I have the sample of data attached below. I need to create a “week” date that goes…
DCC Graph correlationsHello. I have a basic question with predict correlation using MGARCH DCC models. Why initial values …
Problem with Difference in difference specificationHi all, I am sorry if this topic has been covered before. However, I did my research but failed. I…
Subscribe to:
Post Comments (Atom)
0 Response to Separating string variable with parenthesis and commas
Post a Comment