How to get bold values with regex in two variables

Hi UiPath community forum team,

ADD FWIMSIBLK:NAME=“CAP_CdGT-120631_IMSI-310200”,MRI=4001,IMSI=“310200”,NTYPE=PASS;

thanks
shaik

one of many options, depending on the constraints:

I need those values in Two variables please @ppr

Thanks
Shaik

Hi @shaik.muktharvalli1

Store the Input data in a variable called Input and use the below regex.

Check the below regular expressions,

- Assign -> Variable1 = System.Text.RegularExpressions.Regex.Match(Input.toString, "(?<=CdGT.)\d+").Value

(?<=CdGT.)\d+

- Assign -> Variable2 = System.Text.RegularExpressions.Regex.Match(Input.toString, "(?<=IMSI.)\d+").Value

(?<=IMSI.)\d+

Hope it helps!!

1 Like

we are not limited with regex to assign to seperated variables. But we would recommend to retrieve it from the matches / string array… and get triggered by the occurrences

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