Below regular expression not working without www
/((?:https?\:\/\/|www\.)(?:[-a-z0-9]+\.)*[-a-z0-9]+.*)/i
I have checked below URLs
http://regexr.com (working, match)
http://www.regexr.com/ (working, match)
www.regexr.com (working, match)
regexr.com (not working, should be match)
abc@gmail.com (working, not match)
If i used below code
((?:https?\:\/\/|)(?:[-a-z0-9]+\.)*[-a-z0-9]+.*)
then it matched email id also
abc@gmail.com (not working, should not match)