Closed KOLANICH closed 4 years ago
Have you tried ![a] .
? That should be equivalent.
No, I haven't, but I will try. Thanks. Looks like it should work. Shame on me, I haven't thought about this solution.
BTW what should give better performance, the real negative class (positive class having all chars except one in a negative class) or this solution?
Future versions of the compiler could detect and optimize for this pattern.
I don't think introducing special syntax would be required, if performance was an issue.
All symbols except these ones
, for example is in regexps is[^a]
and in ANTLR~[a]
mean "all symbols excepta
".