Regex Tester
Write a regular expression and watch it match against your test text in real time, with every capture group broken out.
How it works
A compact workflow from input to download.
Write your pattern
Enter the regular expression and set the flags you need — global, case-insensitive, multiline.
Add test text
Paste in sample text and every match is highlighted immediately as you type.
Inspect the matches
Each match and its capture groups are listed, so you can see exactly what the pattern is picking up.
Frequently asked questions
Which regex dialect is this?
What do the flags do?
Why is my regex catastrophically slow?
Is my data sent to a server?
A tiny language for describing shapes of text
A regular expression is a small, dense language whose only purpose is to describe patterns in text. Once the vocabulary clicks, an enormous amount of everyday work collapses into a single line: pulling every URL out of a document, validating that a field looks like a date, splitting a log line into its component fields, or finding every function definition in a file. The density is both its power and its reputation — a regex that would take thirty lines of hand-written parsing is one line of symbols, and that line is genuinely hard to read six months later. The two habits that make regexes maintainable are to comment them, and to test them against real data rather than the three examples you happened to think of.
Know when not to use one
Regular expressions are the wrong tool for parsing nested structures, and this is not a matter of taste. HTML, XML and JSON can nest arbitrarily deeply, and regular expressions — in their formal sense — provably cannot count nesting depth, which is why the famous Stack Overflow answer about parsing HTML with regex descends into cosmic horror. The pattern that works for your ten test cases will fail the moment a real document nests one level deeper or puts an angle bracket inside an attribute. Use a real parser for structured formats. Keep regexes for what they are genuinely superb at: flat, line-oriented, pattern-shaped text — log files, CSV fields, validation, search and replace.
Related tools
Continue the workflow with adjacent tools.