Hi Team,
I want regex expression for the below text
""ClientCode"": ""C10009"", ""SiteCode"": ""ALLENTOWN DEMO"", ""OrdeRequestVendorCode"": ""Signant Health"",
From the text, I have to extract the C10009 from the string.
Pls guide me to extract the data over regex.
Cheers!
Anil_G
(Anil Gorthi)
July 17, 2023, 7:22am
4
@Iswarya_P1
Is this a json string that you are getting?
If so use desirialize json and then use
Jobj("ClientCode").ToString
Or if you need regex only then try this
System.Text.RegularExpressions.Regex.Match(str,"(?<=ClientCode"""": """")[A-Za-z0-9]*").Value
Cheers
The client code data may vary. It will not have the same character and number of digit counts. I want to extract the client code information from the string
Cheers!
vrdabberu
(Varunraj Dabberu)
July 17, 2023, 7:23am
7
@Iswarya_P1
you can use the below mentioned regex expression so what ever the client id it will extract the data
Regards
Hi @Iswarya_P1
““ClientCode””:\s*“”(.?)“”.
Sorry, It will work but the regex matched for two more data in my string. So Will you pls give me, How to extract the client code after the colon? It will be very helpful for me.
Cheers!
lrtetala
(Lakshman Reddy)
July 17, 2023, 7:26am
11
@Iswarya_P1
Try this
(?<=ClientCode\"": "").*([A-Z]\d+)
vrdabberu
(Varunraj Dabberu)
July 17, 2023, 7:26am
12
@Iswarya_P1
Can you share the properties of that activity.
regards
rlgandu
(Rajyalakshmi Gandu)
July 17, 2023, 7:27am
13
(?<=ClientCode"“:\s+”")[A-Z]+\d+
Try this hope it works
system
(system)
Closed
July 20, 2023, 7:30am
16
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.