I have a regex that matches the condition x OR y. Sometimes these coincidences overlap, and I want to give preference to one of the conditions.
Here is my test case.
Regex:
X[^\w]*\>|\>[^\w]*X
Input:
Soup> X> Alphabet
Alphabet Soup> X
X> Soup Alphabet
Matches:
Dedicated matching results http://i.friendfeed.com/b55db94551503bf13d16f944fc56d9ff56676b4f
The first highlighted match (yellow) should be X> instead of X , but I'm not sure how to give preference to one of the matches given the match.
source
share