This website requires JavaScript.
Explore
Help
Register
Sign In
greatbody
/
freeCodeCamp
mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
Watch
1
Star
0
Fork
You've already forked freeCodeCamp
0
Code
Issues
Projects
Releases
Wiki
Activity
ea4eaf02b6
freeCodeCamp
/
guide
/
chinese
/
javascript
/
tutorials
/
invert-regular-expression-m...
/
index.md
271 B
Raw
Blame
History
title
localeTitle
Invert Regular Expression Matches with JavaScript
使用JavaScript反转正则表达式匹配
使用
/\S/gi
;匹配字符串中不是空格的所有内容。
您可以通过使用选择的大写版本反转任何匹配
\s
与
\S
的例子。