I would like to clean a group of string variables to remove data inside some nested quotes. I would like to replace these strings, with the substring after the word "value" in the string below (Integreation in red in my example below).
String: {"@odata.type":"#Microsoft.Azure.Connectors.Sha reP oint.SPListExpandedReference","Id":9,"Value":Integration"}
Following the "Id": There is a range of numbers-1 or 2 digits
Any ideas on how to best accomplish this task is much appreciated.
String: {"@odata.type":"#Microsoft.Azure.Connectors.Sha reP oint.SPListExpandedReference","Id":9,"Value":Integration"}
Following the "Id": There is a range of numbers-1 or 2 digits
Code:
*** 0.A Initializing local macros for filepaths and files ******************************************** *** 0.A.1 Folder Navigation local fldr_teamsync "C:\Users\\`c(username)'\Regional" local fldr_auto "`fldr_teamsync'\ Documents\4. Refreshes\Automated Extracts" local fldr_lists "`fldr_auto'\zS_Microsoft-Lists" **************************************************************************************************** *** PART 1: Calling scheduled do files **************************************************************************************************** import delimited "`fldr_lists'\Inventory - Data Sources.csv", bindquote(strict) local cleanvars portfolio portfolio_topic_subtopic status program_client program_data_entry /// software2 type_primary_secondary foreach var in `cleanvars' { gen `var'_clean = regex(4) if regexm(`var', `"{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":[0-9],"Value":,[a-zA-Z]+) }
Comment