Regex to remove all special characters from string?

前端 未结 9 1222
谎友^
谎友^ 2020-12-04 15:15

I\'m completely incapable of regular expressions, and so I need some help with a problem that I think would best be solved by using regular expressions.

I have list

9条回答
  •  有刺的猬
    2020-12-04 15:57

    This should do it:

    [^a-zA-Z0-9]
    

    Basically it matches all non-alphanumeric characters.

提交回复
热议问题