Skip to content

Instantly share code, notes, and snippets.

@arozwalak
Last active December 28, 2015 02:39
Show Gist options
  • Save arozwalak/7429994 to your computer and use it in GitHub Desktop.
Save arozwalak/7429994 to your computer and use it in GitHub Desktop.
RegExp: with or without "http://"
(?:(?:http|https):\/\/)?([-a-zA-Z0-9.]{2,256}\.[a-z]{2,4})\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?
RegExp: /(?:(?:http|https):\/\/)?([-a-zA-Z0-9.]{2,256}\.[a-z]{2,4})\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi
pattern: (?:(?:http|https):\/\/)?([-a-zA-Z0-9.]{2,256}\.[a-z]{2,4})\b(?:\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?
flags: gi
1 capturing groups:
group 1: ([-a-zA-Z0-9.]{2,256}\.[a-z]{2,4})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment