Extrecting

Hello, Can somebody please help me create a regex that extracts a class name from a string? the fixed string is “ClassName” and I want to extract the variable string “Class_Triglav” ( in this case).

"ClassName":"Class_Triglav",

Hi @tomaz ,

You can easily do it by split action.

yourString.Split(":"c)(1)

Can’t do that because this is just a small segment of a string. Sorry I should mention that in a post above. in realitey string is more like this

idence":2},{"Class":"fbd1f440-7e08-4aa1-abbd-709a651d9f1f","ClassName":"Class_Triglav","Confidence":2}]}}],"CreationTime":"2022-04-13T11:08:57.6675471+00:00","SourceFiles":[{"Id":"fe4

Hi @tomaz ,

Try using the Below Regex :

"(?<=""ClassName"":).*?(?=,)"


I have try exactley as you sugested but doesnt work for me. Can you see something i did wrong?

@tomaz , The Reason is the Copy Paste of Data.

The " is not the same as "

@tomaz , It should Work when you try to use the Regex in the Workflow :

System.Text.RegularExpressions.Regex.Match(InputString,"(?<=""ClassName"":).*?(?=,)",System.Text.RegularExpressions.RegexOptions.IgnoreCase).Value

where InputString variable is your Input text.

Thank You !

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.