Created
January 22, 2013 22:49
-
-
Save mschaaf/4599430 to your computer and use it in GitHub Desktop.
parses out host from the follwing strings:
"d protocol://a:b@host",
"d protocol://a:b@host/",
"d protocol://a:b@host?",
"d protocol://a:b@host dfgdg",
"d protocol://host",
"d protocol://host/",
"d protocol://host?",
"d protocol://host fdgdg"
This file contains 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
[^:]+\s?\w://(.+@){0,1}([^/ ?]*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment