Extract only the abcabcabc

Good morning, anyone has any idea on how to extract only the abcabcabc from this string that I have?
"result": "abcabcabc","targetUrl": null,"success": true,"error": null,
with regex or string manipulation? Also I dont know if there is any way to extract based on colors, this abcabcabc text is always green color.

NOTE:in place of abcabcabc may be any text inside that changes every 30min

Hi @Xheni_Xhensila

How about this expression?

System.Text.RegularExpression.Regex.Match(InputString,"(?<="result":\s")([a-zA-Z]+)").Tostring

Regards
Gokul

Hey!

Try this

System.Text.RegularExpressions.Regex.Match(StrVariable,"(?<=:\s").*(?=",)").ToString

Reference:

Regards,
NaNi

1 Like

Hi,

FYI, Another approach:
Parse it as json.

Sample20220802-2.zip (2.4 KB)

Regards,

1 Like

can be done with regex as mentioned by others above. But string looks like a partly JSON. When JSON processing is enforceable, then we would recommend to use this approach

here we would need to know from which application the text is from.

For Web applications we can check the text color with the help of the following:

1 Like

please, could you explain me why you have used 2 pairs of " " for eacjh word at assign activity?

Hi,

It’s syntax of vb. " is expressed as "" in string.

Regards,

thank you!

this functions for the case, thank you very much!

Is there any solution for the case where is needed to extract only the “abcabcabc”
from “{"result":"abcabcabc","targetUrl":null,"success":true,"error":null,"unAuthorizedRequest":false,"__abp":true}”

(without backslashes \ )

Thank you.

please open a new topic for your case as this origin case is solved and closed

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