Project

General

Profile

Actions

Backport #8076

closed

Lookbehind assertion fails with /m mode enabled

Added by naruse (Yui NARUSE) over 11 years ago. Updated over 11 years ago.

Status:
Closed

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


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8023: Lookbehind assertion fails with /m mode enabledClosednagachika (Tomoyuki Chikanaga)03/06/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0