How to extract only “ababab” without backslashes ( \ )
we would recommend before to checkout that not any double quote visualizations from any panels will create a missmatch.
from where was this screenshot done?
What is the real origin source of the string?
Hi @robot_bot
How about this expression?
System.Text.RegularExpressions.Regex.Match(ReadPDF,"(?<=\\"result\\":\\")[a-z]+").Tostring.Trim
Regards
Gokul
from local value in uipath studio, it is the result of write line activity (yellow),
but if you see in output (green), there is no the presence of backslash ().
In which one should I based on to apply the regex in yellow or green one?
The infor starting with "eyJh… is the one I am referring as “ababab”.
Thank you
Updated the expression
System.Text.RegularExpressions.Regex.Match(Inputstring,"(?<=\\"result\\":\\")[a-zA-Z0-9]+").Tostring.Trim
it is not a pdf
as mentioned above and also demonstrated with contains("") - false
so we would assume that the string is a regualar JSON string and can be handled as a JSON (as described in the other topic from where you came)
That is a Input String @robot_bot
ok, but it does not receive it all, it is stopped at point character (.)
How can include these char at regex?
Can you share the same data set @robot_bot
No, but It contains not only a-z, A-Z and 0-9
Also other characters like: .; -; _
so how to can add the range of this chars in regex to can be accepted to in the filtered result.
Hello,
I noticed that your string is a JSON, so you can use the package “UiPath.WebAPI.Activities” and use the activity “Deserialize JSON” passing your variable containing the text and in the output of the activity assign a variable to receive the JSON file.
In the example I used the “jsonText” variable.
Now you just need to access the result property of the variable, like this: jsonText("result").ToString