Project

General

Profile

Actions

Bug #4088

closed

Case Sensitivity in Regular Expressions with Lookbehind

Added by rklemme (Robert Klemme) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-cygwin]
Backport:
[ruby-core:33370]

Description

=begin
It seems regular expressions with negative lookbehind do not treat case properly if

  1. there is an alternative in the lookbehind
  2. one alternative is longer than one char

I believe lines 18 - 20 are wrong and should return the same result as line 17.

Interestingly if the alternatives in lookbehind are exchanged the expression works as expected (lines 23 - 25).
=end


Files

rx.rb (245 Bytes) rx.rb test script which produced the output above rklemme (Robert Klemme), 11/25/2010 05:40 PM
out.txt (861 Bytes) out.txt output of script rklemme (Robert Klemme), 11/25/2010 05:40 PM
rx.rb (287 Bytes) rx.rb Modified script which shows grouping effect rklemme (Robert Klemme), 11/25/2010 06:24 PM
out.txt (1.32 KB) out.txt Output of modified script rklemme (Robert Klemme), 11/25/2010 06:24 PM

Updated by rklemme (Robert Klemme) over 13 years ago

=begin
Added grouping to the lookbehind to check whether precedence of "|" has an effect - it does not. Lines 23 - 25 are also wrong. (Note: line numbers from comment 1 have partially changed.)
=end

Actions #2

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29939.
Robert, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0