Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions
by rntz on Thursday March 23, 2017 @02:23PM
(#13942564)
is also wrong; it doesn't match "expba", but
does.
[ Parent
| on HN ]
Re:The New ‘Absent Operator’ in Ruby’s Regular Expressions
by mnarayan01 on Thursday March 23, 2017 @11:07PM
(#13946285)
/(?=((?!exp).)*a.*)/ =~ "expba"
# => 1
for me at least (using #match is also truthy, but the matched string is not what I'd guess the absent operator would give).