Help me on Regular expression to read values

Hello guys can you please help me on the below string

“INPUT_BENEFIT_NBR=73607, INPUT_SERVICE_CODE=800902, OUTPUT_COPAY_LV1=, OUTPUT_COPAY_LV2=, OUTPUT_COPAY_LV3=1”

From the above string  i want to read the values of output_copay_lv1 values like example output_copay_lv3 =1
I want to read values of 3 output copay levels irespective of any value is there or not .

thanks and regards
venky

Hi @venkateshgorantla,

Please assign, MatchCollection, matc=System.Text.RegularExpressions.Regex.Matches( your_string,"(OUTPUT_COPAY_LV\d+=)[\d]+")

Inside a for each loop of ‘item’ with type argument “System.Text.RegularExpressions.Match”, you will get the match value using "item.Value"

warm Regards,
Nimin

1 Like

hey @nimin i got struct variable types can you please suggest match collection variable type or else can you please make sample workflow it will useful for me thank you soo much for your help…

Hi @venkateshgorantla,

Please have a look at the workflow RegEx_OUTPUT_COPAY.xaml (7.0 KB)

Warm regards,
Nimin

@nimin

which activity you have used for me its showing like this

Hi @venkateshgorantla,

It’s a ‘for each’ activity.

Regards,
Nimin

3 Likes

thank you so much @nimin its working perfectly

1 Like

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