Created
August 6, 2019 15:32
-
-
Save cmd-save/a9e374ce8e1506f14d83bbb55e964fb9 to your computer and use it in GitHub Desktop.
Regex for url that accepts without protocol or a sub domain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const urlReqex = /^((https?|ftp|smtp):\/\/)?(www.)?[a-z0-9]+\.([a-z].+)?[a-z]+(\/[a-zA-Z0-9#]+\/?)*$/; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment