for some weeks im working with regular expressions in php.
Now my question: Is there any way, to make the RegEx greedy over |
?
for example subject: 012345abcdefghijklm
pattern: /(abcde|abcdefghi)/
will extract abcde
, although abcdefghi
is the greedier match.
The only way i found, is to sort the RegEx by the highest length of possibly matches
Thanks