Get Text1

Input Text = “\10.33.105.155\RPA-Bot\Development Files\Easy-HUNG\20230406_G_16_222540-k\23.04.03_RW1_DU.xlsm”
I want Output like this 222540 Only thisno
How to get this

Hi @Kuldeep_Pandey

Can you use this RegEx:

(?<=_)\d+(?=-k\)

image

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=_)\d+(?=-k\\)").Tostring

Hope this helps,
Best Regards.

1 Like

Hi @Kuldeep_Pandey

How about this Regular expression?

System.Text.RegularExpressions.Regex.Match(YourString,"(?<=_)\d{6}").Tostring

image