3 ms·
Wouldn't that end up just being the same as 'regex(Tarzan)'? Those regexes can't match the same thing, they can only overlap. What you want is something like a
by contravariant 5y ago
Wouldn't that end up just being the same as 'regex(Tarzan)'? Those regexes can't match the same thing, they can only overlap.
What you want is something like all matches of regex("Tarzan") not contained in a match for regex("\"Tarzan\""), which is a bit trickier. That would require something like:
regex("Tarzan") - all-substrings(regex("\"Tarzan\""))
and I'm not sure regular languages are closed over the "all-substrings" operation. Actually I'm pretty sure they aren't.