I’m a complete novice when it comes to regex. Could someone help me convert the following expression to preg?
ereg('[a-zA-Z0-9]+[[:punct:]]+', $password)
An explanation to accompany any solution would be especially useful!!!!
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.
To answer your real question, you’d need to structure your code like:
If you wanted to ensure the presence of at least one lowercase letter, at least one uppercase letter, at least one digit, and at least one punctuation character in your password.
Other questions you should read: