Regular Expressions

Flashcard 7 of 10

Given the following sample, how could we define a pattern that would capture the keys in this hash string, without including the colon?

sample = \
  "{ count: 2, title: 'Hello', section: 3 }"

Answer:

Reveal Answer