RegexpLint helps you understand and analyze regular expressions.
We graphically render regular expressions and point out common pitfalls.

Enter a regular expression or try example 1 · example 2 · example 3


Use the table below as a cheat sheet:

[abc] a, b or c . any single character a? zero or one of a
[^abc] any character except a, b, or c \s whitespace a* zero or more of a
[a-z] range a-z \S non-whitespace a+ one or more of a
[a-zA-Z] a-z or A-Z \d any digit a{n} exactly n of a
^ anchor at start of line \D any non-digit a{n,} n or more of a
$ anchor at end of line \w any word character (letter, number, underscore) a{n,m} between n and m of a
(...) capture everything enclosed \W any non-word character a*? zero or more of a (non greedy)
(a|b) a or b \b any word boundary (a)...\1 back reference
(?=a) look ahead (positive) (?!a) look ahead (negative) \B any non-word boundary