freeCodeCamp/guide/chinese/javascript/tutorials/invert-regular-expression-m.../index.md

271 B

title localeTitle
Invert Regular Expression Matches with JavaScript 使用JavaScript反转正则表达式匹配

使用/\S/gi ;匹配字符串中不是空格的所有内容。

您可以通过使用选择的大写版本反转任何匹配\s\S的例子。