asalgan / regex

Regex practice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regular expressions

abc…     Letters
123…     Digits
\d       any Digit
.        any Character
\.       Period
[abc]    Only a, b, or c
[^abc]   Not a, b, nor c
[a-z]    Characters a to z
[0-9]    Numbers 0 to 9
{m}      m Repetitions
{m,n}    m to n Repetitions
*        Zero or more repetitions
+        One or more repetitions
?        Optional
\s       any Whitespace
^…$      Starts and ends
()       capture Group
(a(bc))  capture Sub group
(.*)     capture Variable content
(a|b)    Matchs a or b
\w       any Alphanumeric character
\W       any Non-alphanumeric character
\d       any Digit
\D       any Non-digit character
\s       any Whitespace
\S       any Non-whitespace character

Our JSBin playground

Tutorials

Reference & guides

Tools

Games

About

Regex practice


Languages

Language:Ruby 73.2%Language:CSS 14.4%Language:JavaScript 12.4%