News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.