Skip to content

Instantly share code, notes, and snippets.

@kvn1234
Created January 16, 2018 15:36
Show Gist options
  • Save kvn1234/43de27ac7be30a99763261e8d5e93557 to your computer and use it in GitHub Desktop.
Save kvn1234/43de27ac7be30a99763261e8d5e93557 to your computer and use it in GitHub Desktop.
PHP Regex for finding a URL path
(href=")([A-Za-z0-9_\.\/-]*)(") (no http or https://)
(href=")([\:A-Za-z0-9_\.\/-]*)(") (any url string in an href)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment