Quote:
Originally Posted by ownedbycats
Yes, I was thinking of doing something like that. Would make adding new patterns a bit tricky. But I'm not going for every possible variation, just the most common ones.
|
Using regex alternation (or) is much faster than doing sequential checks. And there is nothing to prevent you from adding another check if fitting into alternation is too hard.