RegExOptions.Greedy Property
Syntax
Greedy as Boolean
Greedy means the search finds everything from the beginning of the first delimiter to end of the last delimiter and everything in-between. For example, Say you want to match the following bold-tagged text in HTML:
The <b>quick</b> brown <b>fox</b> jumped
If you use this pattern:
<b>.+</b>
You end up matching "<b>quick</b> brown <b>fox</b>", which isn't what you wanted.
So, you can turn Greedy off or use this syntax:
<b>.+?</b>
and you will match "<b>quick</b>", which is exactly what you wanted.)
Default is True.