Regex to remove all special characters from string?

前端 未结 9 1360
谎友^
谎友^ 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:42

    Depending on your definition of "special character", I think "[^a-zA-Z0-9]" would probably do the trick. That would find anything that is not a small letter, a capital letter, or a digit.

提交回复
热议问题