extract first two numbers after + sign using regex , how to write regex for that , specifically i have the file name "+25 RES021_20231003233424 " , i need to extract only 25 , can someone please help
Hi,
How about the following?
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\+)\d{2}").Value

regards,
Hi @JOBIN_JOSE
You can try with this expression
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\+)\d{2}").ToString

Try this
System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\+)[0-9]{2}").value.trim
Hi
Try This
strvalue = System.Text.RegularExpressions.Regex.Match(“+25 RES021_20231003233424”,“(?<=+)\d{2}”).Value
Thank you
Hi @JOBIN_JOSE
Input= "+25 RES021_20231003233424 "
Output= System.Text.RegularExpressions.Regex.Match(Input,"(?<=\+)\d+").Value
Hope it helps!!


