Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions
by rntz on Thursday March 23, 2017 @11:01AM
(#13940303)
This isn't about negative lookaheads or lookbehinds. It's about negation proper. It is perfectly declarative: the language matched by (?~E) is the complement of the language matched by E.
[ Parent
| on HN ]
Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions
by brudgers on Thursday March 23, 2017 @01:50PM
(#13942185)
I've found trying to point out the differences between regular expressions as finite automata and regular expressions as a reference to the regex|regexp constructs within programming languages difficult, and have given it up as a hobby.
The programming language constructs are useful in many cases but harder to reason about. The finite automata are easier to reason about but limit themselves to state machines. Here the complexity is that the operator operates in the state-machine space wrapped up inside the programming language construct.
Ok, so I guess I did not give it up as a hobby.