Mega Code Archive

 
Categories / Ruby / String
 

Match doesnt require a regular expression as an argument, it converts any string supplied into a regular expression

puts "String has vowels" if "This is a test".match("[aeiou]")