Ruby - Regular Expressions
What will be the output of this Ruby code?
sentence = "one two three four"
result = sentence.scan(/\b\w{3}\b/)
puts result.inspectsentence = "one two three four"
result = sentence.scan(/\b\w{3}\b/)
puts result.inspect/\b\w{3}\b/ matches words exactly 3 letters long.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions