📅  最后修改于: 2022-03-11 15:04:27.129000             🧑  作者: Mango
代码示例1
Use Regex
text.match(/(\w+)/g).length; //To count Word
text.split(/[\.!\?]+\s/g).filter(Boolean).length; //To Count Sentences