Skip to content

Instantly share code, notes, and snippets.

@avicoder
Last active January 21, 2019 09:55
Show Gist options
  • Save avicoder/5afc5102b68c95dc77c7708d27e2de90 to your computer and use it in GitHub Desktop.
Save avicoder/5afc5102b68c95dc77c7708d27e2de90 to your computer and use it in GitHub Desktop.
Regex Fun
  • 1

/d+

#2

([\da-f]{2}:?){6}

#3

\w+://[\w\./]+

#4

\$\\?[\w_\\{}='\s\+]+\$

#5

((\d\.?){1,3}){6}

#6

href=('|")[\w\S]+("|')

#7

http://[\w\./\?=&~;://-]+(\w|/)

#8

<h[1-6].*h[1-6]>

#9

\(?\d{3}\)?[\.\s/-]\d{3}[\.-]\d{4}

#10

([A-Z]\w+-)?([A-Z]\w+)(,\s)([A-Z]([\{\\"u\}]+)?(\w+)?[']?)(\s?[A-Z](\w+)?)?

#11

((i.+\s<s.+)?((\s?<s\w+|<a)((\s[chs]\w+="(e|m|c|h\w+://((d\.)|w|v|t))|>)).+)(([gna]>)\s?)(.+o)?|(Con\w+)|(Str\w+))

#12

((?<=\.\s)\w+\,\s([A-Z]\.)+)

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