Created
May 15, 2019 22:08
-
-
Save DavidWells/49dc2f77e2ed1ee7ac7b892be32c6822 to your computer and use it in GitHub Desktop.
Parse url with Regex from https://regex101.com/r/vK4rV7/1
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
const reg = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g | |
const url = 'http://video.google.co.uk:80/videoplay?docid=-7246927612831078230&hl=en#hello' | |
reg.exec(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment