What is the Regular Expression For “Not Whitespace and Not a hyphen”

前端 未结 5 882
既然无缘
既然无缘 2020-12-03 04:18

I tried this but it doesn\'t work :

[^\\s-]

Any Ideas?

5条回答
  •  不知归路
    2020-12-03 04:45

    Try [^- ], \s will match 5 other characters beside the space (like tab, newline, formfeed, carriage return).

提交回复
热议问题