Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions
by rntz on Thursday March 23, 2017 @10:35AM
(#13940075)
The negation (complement) of a regular language is always regular. So in the CS theory sense, these are still regular expressions. However, while regular languages correspond to finite automata, the transformation which negates a NFA is not very easy to describe, which is one reason regular expression matching libraries have rarely included negation proper as an operation. Implementing negation proper using backtracking is somewhat easier, but quite expensive if done naively.
[ Parent
| on HN ]
There are no comments on this comment yet.