Ruby - Regular Expressions
Which of the following is the correct syntax to check if the string
"hello123" contains digits using the match operator?"hello123" contains digits using the match operator?/\d+/, which is a regex literal in Ruby.=~ operator expects a regex on the right side, so /\d+/ is correct, not a string.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions