Project

General

Profile

Bug #9087

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

Added by Dawid Grzesiak about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
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

Duplicates Ruby trunk - Bug #4044: Regex matching errors when using \W character class and /i option Closed

History

#1 [ruby-core:58210] Updated by Martin Dürst about 3 years ago

  • Status changed from Open to Closed

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

Also available in: Atom PDF