Module: Groupie::CoreExt::String
- Included in:
- String
- Defined in:
- lib/groupie/core_ext/string.rb
Instance Method Summary collapse
Instance Method Details
#tokenize ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/groupie/core_ext/string.rb', line 4 def tokenize downcase. gsub(/\s/," "). gsub(/[$']/,''). gsub(/<[^>]+?>|[^\w -.,]/,''). split(" ").map {|str| str.gsub(/\A['"]+|[!,."']+\Z/,'')} end |