I'm trying to match all instances of a percentage (e.g. 20%) AFTER a specific pattern (or in this case a word):
Lorem ipsum dolor 10% sit amet, consectetur adipiscing elit. Morbi et
feugiat Discount vitae 15% urna. Sed 20% et lorem in dapibus.
Mauris arcu dui, vestibulum eget eros eu, eleifend luctus risus.
I want to match the 15% and 20%, but not the 10%. It should determine this by making sure the percentages it's matching occur after the word Discount
appears.
This is the pattern I came up with but it seems to match all percentages:
(?<=Discount)*(\d+%)+
This would using the C# / .NET regex engine.