What does this expression return?
'a1\nb2'.match(/^\w/gm)
- ['a', 'b']
- ['a']
- ['a1', 'b2']
- null
With the
Play Regex ▸
m flag ^ matches at the start of every line, not just the start of the string.