Help in Regex

Invoice CI01969 approved.

Above is string format. Need to extract Invoice number from that. In above case invoice number is CI01969.

Hi,

How about the following pattern?

(?<=Invoice\s)\w+

image

Regards,

Hi @Puneet_Singh ,

Check with the below Regex :

(?<=Invoice).*(?=approved)

HI @Puneet_Singh

Checkout this expression

System.Text.RegularExpressions.Regex.Match(InputString,"(?<=Invoice\s)\S+").Tostring

image

Regards
Sudharsan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.