One of my very small and pedantic pet peeves with regular expressions is that there is no standard way to match nothing.
Like, if you think about regular expressions in terms of abstract algebra you have:
- the empty regex (i.e.
"") is equivalent to 1 - concatenating two regular expressions is equivalent to multiplication (×)
- alternation (i.e.
|) is equivalent to addition (+)
… but there is no standard regex analog of 0 (a regular expression that matches nothing).
Like, you can hack something like this with a regular expression like .^ but it would be nice if there were a standard symbol that represented 0 like, i dunno, #.