Home / Report Question

Q. What does the \w character class represent in a regular expression in Ruby?
  • A. Matches any whitespace character
  • B. Matches any word character
  • C. Matches any digit character
  • D. Matches any whitespace character

Correct Answer: B