What does this expression return?
'cat concat cats'.match(/\bcat\b/g)
- ['cat']
- ['cat', 'cat']
- ['cat', 'cat', 'cat']
- null
\b needs a word/non-word transition on both sides, so only the standalone word "cat" qualifies.'cat concat cats'.match(/\bcat\b/g)
\b needs a word/non-word transition on both sides, so only the standalone word "cat" qualifies.