Regex match in one group

I want to extract all the word after the word Driver. I am currently using (?!Driver\b)\b\w+

Instead of 3 matches I want one match.

Thanks

Hi,

What is your expected output? Is it Mr? If so the following works

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Driver\s+)\w+").Value

If Mr TEST TESTING, the following will work.

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=Driver\s+).+").Value

Regards,

1 Like

Thanks @Yoichi you are a lifesaver

1 Like

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