...
Quiz on Advanced Topics
Take a quiz on some concepts in this chapter.
What’s the output of the following code snippet?
text = "John is a quick boy running along the field." p text.scan(/\b[ABJRabjr][a-z]+\b/)
[“John”, “boy”, “running”, “along”]
["John", "a", "boy", "running", "along"]
["John"]
[“John”, “boy”, “along”]
More on Character Classes (Regex)
Exercise 1: Capture the Class Names