Project

General

Profile

This project is closed and read-only.

Actions

Backport #8076

closed

Lookbehind assertion fails with /m mode enabled

Backport #8076: Lookbehind assertion fails with /m mode enabled

Added by naruse (Yui NARUSE) over 13 years ago. Updated over 13 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)Actions
Actions

Also available in: PDF Atom