Hi,
I have two examples of string:
- {“status”: “done”, “tenant”: “xyz”, “Comment”: w - 33 ww, “number”: “7233”}
- {“status”: “done”, “tenant”: “xyz”, “Comment”: “w - 33 ww”, “number”: “7233”}
What RegEx to use so that it always pulls out my value after the word “Comment”:
in this case it is: w - 33 ww.
ppr
(Peter Preuss)
2
it looks also as it is JSON Data, would the Comment value be surrounded by "
Regex:
(?<=Comment":).*?(?=\,)
Anil_G
(Anil Gorthi)
3
@Paulina_x
These looks like jsons…you can download webapi package and then use deserializejson adna cess them easily and directly
Json(“Comment”) will give the value…json being in the output of desirialize json
If youstill want to do with regex…then
System.Text.RegularExpressions.Regex.Match(str,"(?<=Comment"":).*(?=\,)").Value.Replace("""","")
Cheers
system
(system)
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.