Ruby - Regular Expressions
What is the output of this Ruby code?
text = "hello 123 world 456" matches = text.scan(/\d+/) puts matches.inspect
text = "hello 123 world 456" matches = text.scan(/\d+/) puts matches.inspect
/\d+/ matches sequences of digits, not individual digits.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions