Last active
July 21, 2018 18:46
-
-
Save default-writer/7bb4713dc63a88f3dc967c7cd9d9847c to your computer and use it in GitHub Desktop.
URL regular expression
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
| URL | |
| ([A-Za-z]{3,9}:\/\/)([-;&=\+\$,\w]+@|[-;&=\+\$,\w]+:\w+@)?([-A-Za-z0-9\.]+(?::\d+)?)+(\/)?([\-\+&;%@\/\w]+\/)?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))? | |
| ([A-Za-z]{3,9}:\/\/)([-;&=\+\$,\w]+@|[-;&=\+\$,\w]+:\w+@)?([-A-Za-z0-9\.]+(?::\d+)?)+(\/)?([\-\+&;%@\/\w]+){1,}?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))? | |
| ([A-Za-z]{3,9}:\/\/)([-;&=\+\$,\w]+@|[-;&=\+\$,\w]+:\w+@)?([-A-Za-z0-9\.]+(?::\d+)?)+(\/)?([\-\+&;%@\/\w]+\/)?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))? | |
| URL path after / | |
| ([\-\+&;%@\/\w]+\/)?([\-\+=&;%@\.\w]+)?(\??[A-Za-z0-9]+(?:=[\-\+=&;%@\/\.\w]+|[\-\+=&;%@\/\.\w]+)(?:[&\w+=[\-\+=&;%@\/\.\w]+]+)?)?(?:(#[A-Za-z0-9]+))? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment