From: "duerst (Martin Dürst)" Date: 2013-11-07T12:31:22+09:00 Subject: [ruby-core:58210] [ruby-trunk - Bug #9087][Closed] swallowing "s" letters when "i" flag is on Issue #9087 has been updated by duerst (Martin D��rst). Status changed from Open to Closed Closed because it's a duplicate (of #4044). ---------------------------------------- Bug #9087: swallowing "s" letters when "i" flag is on https://bugs.ruby-lang.org/issues/9087#change-42793 Author: mg (Dawid Grzesiak) Status: Closed Priority: Low Assignee: Category: regexp Target version: ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN # 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" -- http://bugs.ruby-lang.org/