gokul1904
(Glory 01)
1
Hi team,
I want to extract only the values inside the () for the below records in a datatable -
Spend_Category
Social (SZ01428)
Remit (CC01438)
Local (MCZ134438)
Vibrant (LC0134248)
Currently I am using a regex expression -
System.Text.RegularExpressions.Regex.Match(FCR_DT1(0)(“Spend_Category”).Tostring,“[0-9A-Z]+”).Value
But I am not able to fetch the correct values.
Can you please here?
Regards,
G
Str=Regex.Match(Str_variable,“((.*?))”).Group(1).Value
Sanjit_Pal
(Sanjit Pal)
4
Hey @gokul1904,
As suggested by @ppr you should use the Lookbehind and LookAhead method to get the desired result.
For more info go through Regex Tutorial - Lookahead and Lookbehind Zero-Length Assertions
Thanks,
Sanjit
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.