I need to extract text present in the bracket from the whole string
The string1 is: ELIGIBLE - PREMIUM TAB (PREMTAB_HCC)
And the string2 is : ELIGIBLE - PREMIUMTAB (PREMTAB_HCC) | 2 Year | PREMTAB_HCC
I want to match only the text present in bracket if it is same or not i.e. (PREMTAB_HCC)
Just for a clarification, The regex which u mentioned will give the output with the braces.
How to get the value alone without braces? How to modify the regex value for the same ?
This will work for you: try it with message box.
System.Text.RegularExpressions.Regex.Match(“I am from (Pune) Maharashtra”,“(?<=().*?(?=))”).ToString
Output: Pune