Actions
Bug #9087
closedswallowing "s" letters when "i" flag is on
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
Backport:
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"
Updated by duerst (Martin Dürst) about 11 years ago
- Status changed from Open to Closed
Closed because it's a duplicate (of #4044).
Actions
Like0
Like0