Regular Expressions 101

Library entries

Accept url without www

Vote

5

Regular Expression
javascript

/
^(http:\/\/www\.|https:\/\/www\.|ftp:\/\/www.|www\.)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$
/

Description

Loading markdown...
Submitted by anonymous - 8 years ago