3 ms·
It's more comfortable / fast make a JS that concatenates the strings (class .match) with pipe separator.
by SnaKeZ 10y ago
It's more comfortable / fast make a JS that concatenates the strings (class .match) with pipe separator.
- logicallee 10y agobut I didn't "cheat" - I literally typed by hand a regex for the matches but not the non-matches. (Exactly as was asked.) I guess a way to fix this would be to make it like "regex golf" where there is a fixed time but the shortest overall regex wins... It could also be defeated if most substrings of each match were also in the things to avoid. For example if you're supposed to match cat but avoid catch then my strategy would be defeated. I would have to addd ^cat$ -- which wouuld cost me time and characters. :)