function FindWord(article){
return article.match(/\b\w+\b/g);
}
FindWord('If I knew it would be the last time Id see you fall asleep,I would tuck you in more tightly and If I knew it would be the last time Id see you walk out the door.')
//["If", "I", "knew", "it", "would", "be", "the", "last", "time", "Id",
JS正则寻找英文单词
最新推荐文章于 2022-08-07 00:51:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)