How to capture an arbitrary number of groups in JavaScript Regexp?

前端 未结 4 1463
鱼传尺愫
鱼传尺愫 2020-11-22 08:38

I would expect this line of JavaScript:

\"foo bar baz\".match(/^(\\s*\\w+)+$/)

to return something like:

[\"foo bar baz\",          


        
4条回答
提交回复
热议问题