I would like to remove all characters that do not match a specified Regex.
for example
$a = "hello my name is ,pate !";
echo notin_replace("[a-zA-Z]","",$a);
hello my name is pate
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.
[^a-zA-Z]Mind the carret at the beginning of the character class. It means not.
Don’t forget to add space as well to the allowed characters, otherwise it would be removed.