News for hackers. Stuff that matters.
Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions by runako on Thursday March 23, 2017 @10:08AM (#13939837)
I haven't completely ingested this post yet, but this seems to be incorrect:

> I'm pretty sure you can emulate the absent operator with look-ahead expressions. Untested: (?=((?!exp).)*$)

From TFA: "Note that this is not the same as a negative look-behind or look-ahead — we’ll see how shortly."

Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions by falsedan on Thursday March 23, 2017 @10:30AM (#13940021)
The article explains that (?~foo) is not the same as (?!foo), since the latter fails the match if it matches, but the former succeeds if it can match anything that's not 'foo' (including 'oo'). The first examples anchor the patterns, so that this behaviour:

  "foo" ~= /(?~foo)/ # => 1
isn't revealed.
Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions by perlgeek on Thursday March 23, 2017 @10:26AM (#13939990)
Well, it's not the same as a simple positive or negative look-ahead, but that's not what I proposed either.