更新时间:2023-01-14 19:48:01
尝试 \ W
(大写W)。
\w
选择单词,而 \ W
选择不是字。并且在表达式中看起来更好一些。
The \w
selects word, while \W
selects not word. And looks a bit nicer in the expression.
这是一个 RegEx cheatsheet ,它在你编码时很方便!
Here's a RegEx cheatsheet, it comes handy while you're coding!