Skip to content
A collection of regexes for every possbile use
Branch: master
Clone or download
Latest commit 96eef15 Sep 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Update README.md Sep 6, 2019

README.md

RegHex

RegHex is a collection of regexes for every use.

Table of Contents

Artifactory API Token

(?:\s|=|:|"|^)AKC[a-zA-Z0-9]{10,}

Artifactory Password

(?:\s|=|:|"|^)AP[\dABCDEF][a-zA-Z0-9]{8,}

AWS Client ID

(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}

AWS MWS Key

amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

AWS Secret Key

(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]

Base32

(?:[A-Z2-7]{8})*(?:[A-Z2-7]{2}={6}|[A-Z2-7]{4}={4}|[A-Z2-7]{5}={3}|[A-Z2-7]{7}=)?

Base64

(eyJ|YTo|Tzo|PD[89]|aHR0cHM6L|aHR0cDo|rO0)[a-zA-Z0-9+/]+={0,2}

Basic Auth Credentials

(?<=:\/\/)[a-zA-Z0-9]+:[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-zA-Z]+

Cloudinary Basic Auth

cloudinary:\/\/[0-9]{15}:[0-9A-Za-z]+@[a-z]+

Facebook Access Token

EAACEdEose0cBA[0-9A-Za-z]+

Facebook Client ID

(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}

Facebook Oauth

[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K].*['|\"][0-9a-f]{32}['|\"]

Facebook Secret Key

(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}

Github

(?i)github(.{0,20})?(?-i)['\"][0-9a-zA-Z]{35,40}

Google API Key

AIza[0-9A-Za-z\\-_]{35}

Google Cloud Platform API Key

(?i)(google|gcp|youtube|drive|yt)(.{0,20})?['\"][AIza[0-9a-z\\-_]{35}]['\"]

Google Drive API Key

AIza[0-9A-Za-z\\-_]{35}

Google Drive Oauth

[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com

Google Gmail API Key

AIza[0-9A-Za-z\\-_]{35}

Google Gmail Oauth

[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com

Google Oauth Access Token

ya29\\.[0-9A-Za-z\\-_]+

Google Youtube API Key

AIza[0-9A-Za-z\\-_]{35}

Google Youtube Oauth

[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com

IPv4

\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}\b

IPv6

(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))

Javascript Variables

(?:const|let|var)\s+\K(\w+?)(?=[;.=\s])

LinkedIn Client ID

(?i)linkedin(.{0,20})?(?-i)['\"][0-9a-z]{12}['\"]

LinkedIn Secret Key

(?i)linkedin(.{0,20})?['\"][0-9a-z]{16}['\"]

Mailto:

(?<=mailto:)[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9.-]+

MD5 Hash

[a-f0-9]{32}

Slack Token

xox[baprs]-([0-9a-zA-Z]{10,48})?

Slack Webhook

https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}

Stripe API Key

(?:r|s)k_live_[0-9a-zA-Z]{24}

Twitter Client ID

(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}

Twitter Secret Key

(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}

URL Parameter

(?<=\?|\&)[a-zA-Z0-9_]+(?=\=)

URLs

With HTTP Protocol:

https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)

Without Protocol:

[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)

Credits

You can’t perform that action at this time.