Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Math globally in regex C#

$
0
0

Hi.

System.Text.RegularExpressions.Match x = Regex.Match(textBox1.Text, @"\b\w+(?='s)\b");

I want to match the names followed by 's in the textBox1. And here is the code for it. But the problem is it only matches the very first name in the text box and rest other would ignore. In perl language there is a way to match globally using "/g". I want to know if visual C# has something like that to do regex matches globally without doing any modification to this regexpression ?

Thanks.


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>