Project

General

Profile

Actions

Bug #9087

closed

swallowing "s" letters when "i" flag is on

Added by mg (Dawid Grzesiak) over 10 years ago. Updated over 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
[ruby-core:58199]

Description

This regexp is removing 's' characters from the string

irb(main):091:0> "fdsa-f fdas5_-423432".gsub /[_\W]/i, ''
=> "fdaffda5423432"

While this is not:

irb(main):092:0> "fdsa-f fdas5_-423432".gsub /[\W]/, ''
=> "fdsaffdas5423432"
irb(main):093:0> "fdsa-f fdas5
-423432".gsub /[^0-9a-z]/i, ''
=> "fdsaffdas5423432"


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #4044: Regex matching errors when using \W character class and /i optionClosednaruse (Yui NARUSE)Actions

Updated by duerst (Martin Dürst) over 10 years ago

  • Status changed from Open to Closed

Closed because it's a duplicate (of #4044).

Actions

Also available in: Atom PDF

Like0
Like0