Extract substring within Brackets

Hello ,

I have string variable ; 1/6( 12) , But I only require 12 from with the bracket ,
please help me split and get the required substring.

Thank you

Hi,

How about the following?

System.Text.RegularExpressions.Regex.Match(strData,"(?<=\()[^()]+").Value

If you need to delete white spaces before/after digits, the following will help you.

System.Text.RegularExpressions.Regex.Match(strData,"(?<=\()[^()]+").Value.Trim()

Regards,

Hi @Yugal_Raju

Pls use this in Assign Activity:

outputString = System.Text.RegularExpressions.Regex.Match(inputString, “((\d+))”).Groups(1).Value.Trim()

If helpful, mark as solution. Happy automation with UiPath

Hey you will want to use this with in an assign activity

System.Text.RegularExpressions.Regex.Match(inputString, “((\d+))”).Groups(1).Value.Trim()

You can also use Find Matching Patterns activity within UiPath and add only the Regex part