Regular expressions are dense enough that trial and error is the only realistic way to build one. This tester evaluates your pattern against sample text on every keystroke, highlights each match in place, and lists capture groups and their positions so you can see exactly what the engine matched.
JavaScript’s, via the native RegExp engine. Most syntax is shared with PCRE, but lookbehind support varies by browser and some PCRE features such as recursion do not exist here.
A pattern with nested quantifiers like (a+)+ can take exponential time on non-matching input, freezing the page or hanging a server. Avoid nesting quantifiers around the same character class.
Escape it as \. — an unescaped dot matches any character except a newline, which is why unanchored patterns often match far more than intended.
No. HTML is not a regular language, so nesting will eventually defeat any pattern. Use a DOM parser; regex is for flat, predictable text.
All free tools · Blog · About · Contact