Regular expressions character classes allow you to match against a specific set of characters.
For example, you can scan through all the vowels in a string:
"This is a test".scan(/[aeiou]/) { |x| puts x }
[aeiou] means "match any of a, e, i, o, or u."
You can also specify ranges of characters inside the square brackets, like so:
"This is a test".scan(/[a-m]/) { |x| puts x }
This scan matches all lowercase letters between a and m.