Actions
Backport #8023
closedLookbehind assertion fails with /m mode enabled
Status:
Closed
Assignee:
Description
Lookbehind assertions fail if they are longer than one character, and if dotall mode is set.
irb(main):001:0> "foo" =~ /(?<=f)./m
=> 1
irb(main):002:0> "foo" =~ /(?<=fo)./m
=> nil
The latter should have matched the "o". This only seems to happen with dotall mode turned on (dot matches newline); without it, everything is OK:
irb(main):003:0> "foo" =~ /(?<=f)./
=> 1
irb(main):004:0> "foo" =~ /(?<=fo)./
=> 2
Actions
Like0
Like0Like0Like0Like0Like0Like0