I have folowing string:
a&b.c'd,e f
How do I look like
а_b_c_d_e_f
How look like the regex pattern?
Thanks in advance !
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will look as simple as…
… but it should actually depend on what characters you consider special, as
\Wis equivalent to[^a-zA-Z0-9_](i.e., anything that is not alphanumeric or ‘_’). It may or may not be sufficient in your case; if not, perhaps you’d just use a character class here:In this example hyphen
'-'won’t be replaced as well.