How to get regex value from json

Hi Team,

I want to get regex from dictionary ,please help me anyone for this



Raja G

Hi @Raja.G

Try like this

Pass your pattern in the asset or config file and give that pattern in your expression


Give it a try


Seems like you’d be better off deserializing the JSON into an actual dictionary, and then look for the value there. JSON isn’t a dictionary, it’s just a string.

Hi @Raja.G

Share the sample input file


“str_name”:“(?<=hello:)([\S\s]*)” —Add to notepad

This is only for sample

@Raja.G ,

Could you explain a bit more as to what you want to perform ?

As in your previous Topic, you did have the Json Converted to the Dictionary but a Regex expression was not introduced into the data.

We would need to know what exactly is your requirement.

Hi @supermanPunch ,

Actually i have string and regex both in txt json format ,i want to get and pass to matches and if condition
string to if
Regex to Matches

“str_name”:“(?<=Hello:\s) (\d{2}/d{2}/d{2})”,
Raja G

@Raja.G ,

If the Json was already converted to Dictionary, then the expression you have used should get the value i.e the regex expression.


Maybe you want to loop all the values in the Json and use the Regex Expression present in each of them in Matches Activity ? If so, Try to use For Each Loop Activity and Pass the Dictionary as the Value to loop. Then we could access the Key and Value using .Key and .Value Properties.


I need to get date in regex from dictionary , “/” symbol have so only i couldnt able to get, please help me anyone for this.

Input json – “str_date”:“(\d{2}/\d{2}/\d{2})”


Expected output:

Hello, have you tried using this function in UiPath? It is possible to perform regex functions natively

@Raja.G ,

In that case, an Escape character would be necessary. You would need to modify the Json in the below way :



(Notice the \ at the beginning of \d)

Output :

Let us know if you were able to make the necessary changes.

Hi @Raja.G

You can try with this expression



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