From: "k_takata (Ken Takata)" Date: 2013-03-12T12:55:57+09:00 Subject: [ruby-core:53327] [Backport93 - Backport #8076] Lookbehind assertion fails with /m mode enabled Issue #8076 has been updated by k_takata (Ken Takata). ��������������������������������������������������������������������������������������� https://github.com/k-takata/Onigmo/commit/962464a4dd4a9342febfd3e139d51d4282395b28 ��� regcomp.c ��������������������������������������������������������� ��������������������������� regexec.c ������������������������ #3568 ������������������������������������������������������������������������������������������1.9.3������������������������������������������������ ---------------------------------------- Backport #8076: Lookbehind assertion fails with /m mode enabled https://bugs.ruby-lang.org/issues/8076#change-37523 Author: naruse (Yui NARUSE) Status: Assigned Priority: Normal Assignee: usa (Usaku NAKAMURA) Category: Target version: 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 -- http://bugs.ruby-lang.org/