Mega Code Archive
Categories
/
Ruby
/
String
Specify ranges of characters inside the square brackets
# This scan matches all lowercase letters between a and m. "This is a test".scan(/[a-m]/) { |x| puts x }