Project

General

Profile

Actions

Bug #12728

closed

Negative lookahead does not work for "+" even though works for "@"

Added by rklemme (Robert Klemme) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-cygwin]
[ruby-core:77160]

Description

I'll attach a test program that shows the effect. Basically, if I have a negative lookahead in the regex like (?!@) and "@" shows up in the proper location I get a mismatch (1. case). This is expected. If I exchange the "@" with a "+" or "[+]" in the regex and a "+" in the input, a match occurs (case 2 and 3). This is the bug. If the "+" or "@" is removed from the string an expected match occurs (case 4 and 5). I was not able to boil this down to a smaller example yet.


Files

rx-mini.rb (1.63 KB) rx-mini.rb rklemme (Robert Klemme), 09/06/2016 01:54 PM
rx-mini.rb (1.65 KB) rx-mini.rb rklemme (Robert Klemme), 10/01/2016 08:59 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0