Driving me nuts this.
Consider the following string
0ABC123456 ABC123456
The following regexp is used through .Net regexp
Which in theory should return two matches as both patterns return a match, and they are "|" seperated.
It only returns the last one.
If I make the match lazy, it returns only the first one as expected.
eg
Any regexp buffs out there?
Consider the following string
0ABC123456 ABC123456
The following regexp is used through .Net regexp
^.*\s(?<Reference>(0[a-zA-Z]{3}\d{6}|[a-zA-Z]{3}\d{3,7}))
It only returns the last one.

If I make the match lazy, it returns only the first one as expected.
eg
^.*?\s(?<Reference>(0[a-zA-Z]{3}\d{6}|[a-zA-Z]{3}\d{3,7}))

Comment