use a method called match, provided by the String class : match « String « Ruby
- Ruby
- String
- match
use a method called match, provided by the String class
puts "String has vowels" if "This is a test".match(/[aeiou]/)
Related examples in the same category