You can use a character class :
(您可以使用字符类 :)
/[^s\]/
matches anything that is not a whitespace character nor a \
.
(匹配不是空格字符也不是\
。)
Here's another example: (这是另一个例子:)
[abc]
means "match a
, b
or c
";
([abc]
意思是“匹配a
, b
或c
”;)
[^abc]
means "match any character except a
, b
or c
". ([^abc]
意思是“匹配除a
, b
或c
以外a
任何字符”。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…