To check whether a certain string matches against the pattern, you can use string value match.
To check if a string contains any vowels:
puts "String has vowels" if "This is a test" =~ /[aeiou]/
Here, =~ is a matching operator.
If the string has a match with the regular expression following the operator, then the expression returns the position of the first match.
To do the opposite:
puts "String contains no digits" unless "This is a test" =~ /[0-9]/