Does anyone know a regular expression that checks for a valid url or an email address. I need the user to enter either a contact page url or email address. Here is the regex I have so far:
^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
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.
Do a google search for “Regular expression for URL” and “Regular Expression for email address”. You will find lots of results.