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
Continuously compounded returns in event studies (e.g., eventstudy2)Hello, I am currently conducting an event study. I used the Stata code eventstudy2 by Mr. Kaspereit…
What does inflate mean in a ZINB model?I am not sure what variable (predictor) to put in inflate( ) as I do not really understand the purpo…
do year effects in xtreg capture year effects for subpopulations?In some ways, this is more of a model-building question than a Stata question, but it is related to …
New VariableHi, I want to create a new variable based on a year variable already within the dataset. The years i…
Logit models and stationery predictors*Do logit models require stationary predictors? …
Subscribe to:
Post Comments (Atom)
0 Response to Separating string variable with parenthesis and commas
Post a Comment