I want to check a string to allow only a-z A-Z 0-9 . / ? & but I’m unsure how exactly to use preg_match().
If you could also explain what each part of the code is I’d appreciate it! (ie why do you add /^ and how to you add a /)
Thanks
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.
Here it is:
You can build your own character classes and validate strings this way.
Explanation: