I want to validate a url that is with or without http.
i tried ^http(s{0,1})://[a-zA-Z0-9_/\-\.]+\.([A-Za-z/]{2,5})[a-zA-Z0-9_/\&\?\=\-\.\~\%]*
But this is matches http://google.com but not www.google.com
.
i want a regex that matches www.google.com too.
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…