freeCodeCamp/guide/chinese/certifications/javascript-algorithms-and-d.../regular-expressions/match-all-letters-and-numbers/index.md

761 B
Raw Blame History

title localeTitle
Match All Letters and Numbers 匹配所有字母和数字

问题 使用速记字符类\ w来计算各种引号和字符串中的字母数字字符数。

解 让quoteSample =“五个拳击向导快速跳跃。”; 让alphabetRegexV2 = / \ w / gi; //改变这一行 let result = quoteSample.matchalphabetRegexV2.length;

匹配所有字母和数字

这是一个存根。 帮助我们的社区扩展它

这种快速风格指南有助于确保您的拉取请求被接受