4 ms·
It doesn't rely on order of operations, at least in this example? "Tarzan" will match one character earlier than Tarzan as the sting is scanned, so it would be
by BeeOnRope 5y ago
It doesn't rely on order of operations, at least in this example?
"Tarzan" will match one character earlier than Tarzan as the sting is scanned, so it would be discarded even if you flipped the order of the alternation.
This isn't true of examples where the good and bad marches can start at the same character.
- ganafagol 5y agoThat the input is matched position by position to alternative patterns and the first one is returned is another one of said assumptions.