^a-zA-Z0-9 excluding spaces?

前端 未结 4 1800
遇见更好的自我
遇见更好的自我 2021-02-08 04:50

I am trying to find everything in a paragraph that is not abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 and not space / /gi

/[^a-zA-Z0-9]|[^ ]/g         


        
4条回答
  •  醉酒成梦
    2021-02-08 05:36

    If you only want to exclude spaces use:

    [^ ]*
    

    Test the regex here if you want.

提交回复
热议问题