Ruby - Regular Expressions
Which of the following is the correct syntax to replace all whitespace characters in a string with underscores using
gsub and regex?gsub and regex?/\s/ matches any whitespace character including spaces.gsub with regex pattern// around the pattern.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions