Last active
December 18, 2019 19:24
-
-
Save leotada/08059bc5fc886deed9ec17c918489ca2 to your computer and use it in GitHub Desktop.
Regex to get domain in a url - link
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
| domain | |
| ([\w-]+\.)+(\w+) | |
| link to another page | |
| href="(.+?)" | |
| link to another page excluding extensions | |
| href="(.+(?:(?<!css|js|jpg|jpeg|gif|tiff|png|bmp|svg|ico)))" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment