Using regex find specific value of string irrespective of Caps

I need search from large extracted string. The values can be case sensitive. I want to use regex.

Thanks

1 Like

We would use the case insensitive flag / option
grafik

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

Hi @BHUSHAN_NAGAONKAR1

Can you share some sample input and expected output.

Regards

Hi, Value will be assigned to variable

Value = “string”

I need to find from extracted pdf string.
It contains lot of data.

I want to find a value from the extracted pdf.

Thanks

Will this work if we have variable?

sure, it will also work with variables

grafik

I will check and inform you

Hi,

You can try this:-

Boolean var=System.Text.RegularExpressions.Regex.IsMatch(yourString, “your_value”)

Thanks.

Var should be boolean?

1 Like

Hi @BHUSHAN_NAGAONKAR1 ,

Yes variable type will be Boolean

Basically i want to see if the value exists and write line in output

1 Like

Hi @BHUSHAN_NAGAONKAR1 ,

Try as below:-

matchedValue = System.Text.RegularExpressions.Regex.Match(yourString, “your_value”).Value

If not match, then matched value will be blank.

Thanks

Hi, can you share variable type for last regex for .MatchCollection

Thankyou

I’ll try and update you.

Thankyou

@Jayesh_678 It worked Thankyou so much

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