Skip to content

Instantly share code, notes, and snippets.

@jpigla
Last active December 14, 2020 10:16
Show Gist options
  • Save jpigla/620d20475bcf5cc900fe9db89498b061 to your computer and use it in GitHub Desktop.
Save jpigla/620d20475bcf5cc900fe9db89498b061 to your computer and use it in GitHub Desktop.

Collection of useful Regex

Extract a domain name
^(?:.*:\/\/)?(?:www\.)?([^:\/]*).*$

Look for a specific domain name
\"(https?:\/\/(w{3}\.)?example.com\/?.*?)\"

Extract CID from URL (CoBi/AuBi)
.*[\-|\_](\d.*)\.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment