3 ms·
A regex language could fix it by some clear prefix convention or whatever for all operators. Though more verbose, it would still be less verbose than alternativ
by kazinator 10y ago
A regex language could fix it by some clear prefix convention or whatever for all operators. Though more verbose, it would still be less verbose than alternatives.
Suppose all regex operator characters have to be backslashed (and \\ stands for a single \). Then it's clear. No backslash means it's literal; otherwise it's an operator (and a backslash on a nonexistent operator is a parse error).
The ambiguities exist because regex aficionados want common operators to be just one character long.