I would expect this line of JavaScript:
\"foo bar baz\".match(/^(\\s*\\w+)+$/)
to return something like:
[\"foo bar baz\",
How's about this? "foo bar baz".match(/(\w+)+/g)
"foo bar baz".match(/(\w+)+/g)