Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Rails Regex: Remove All Non-word Characters From A String

DZone's Guide to

Rails Regex: Remove All Non-word Characters From A String

·
Free Resource

s.gsub!(/\W+/, '')
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}