^a-zA-Z0-9 excluding spaces?

前端 未结 4 1782
遇见更好的自我
遇见更好的自我 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:27

    You can use this for am trying to find everything in a paragraph that is not abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 and not space / /gi

    replaceAll("[^A-Za-z0-9\\s]", "")
    

提交回复
热议问题