Please I want to validate the skype name using regular expressions in PHP.
NOTE: It must be between 6-32 characters, start with a letter and contain only letters and numbers (no spaces or special characters).
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.
This pattern should work for you:
This will match a leading letter, followed by any alpha-numeric combination up to a total of between 6 – 32 characters (for the entire string).
You can use this in PHP with:
Note, in the
preg_match(), I added theiregex option to ignore case. Also, I lead the pattern with^to signify that the pattern has to start at the beginning of the string and I ended with a$to signify that the pattern has to finish at the end of the string.