A side note: > The fact that /[ |a]/ is a legal special case > meaning /[a]/ helps confuse things a bit further.
Where is this special case specified? 2011/5/6 Carl Mäsak <cma...@gmail.com>: > Patrik (>): >>> I find nothing in the spec that addresses this case specifically. >> >> From the spec: >> >> The new :s (:sigspace) modifier causes whitespace sequences to be >> considered "significant"; they are replaced by a whitespace matching >> rule, <.ws> >> >> I can't find any exception to this rule. Therefore, as I read it, >> every whitespace should be replaced by <.ws>. > > The rule about empty (sub-)regexes being illegal is applied before the > rule about everywhitespace being replaced by <.ws>. It doesn't matter > whether :sigspace is on or not: nothing is always illegal. > > // Carl >