Monday, January 17, 2011

How to Strip All Non-Alphanumeric Characters from a String in Ruby

x.gsub(/[^[:alnum:]]/, '')

0 comments:

Post a Comment