Test a regular expression live — see every match highlighted on the left and a full capture-group breakdown on the right. Then copy ready-to-run code for your language.
Regular expressions are powerful and famously fiddly. This tester gives you a tight feedback loop: type a pattern and instantly see what it matches, highlighted right in the text, with every capture group broken out beside it. When the pattern does what you want, copy a ready-to-run snippet for the language you're working in.
It runs entirely in your browser. Your patterns and test text never touch a server — handy when you're testing against real log lines, customer data, or anything you'd rather not paste into a random website.
$1, $2, $& and preview the rewritten text.Pick a language and the tool writes a copy-paste snippet that compiles your pattern with the right flags and iterates the matches — for JavaScript, Python, R, Java, C#/.NET, PHP, Ruby, Go, and grep (PCRE). It handles the awkward bits for you: raw strings in Python, doubled backslashes in Java and R, perl = TRUE in R, inline flags where a language has no flag argument, and the (?P<name>) vs (?<name>) named-group syntax difference between Python and the rest.
[[:alpha:]] aren't all portable. The generated snippet notes per-language quirks.^/$ as line anchors by default and uses /m for dotall. The notes call these out.(?P<name>…) — they're understood here and converted appropriately in each snippet.No account, no watermark, no upload — just iterate until the pattern is right.
Type the pattern and paste sample text: matches highlight live as you edit, so every tweak gets instant feedback. When it works, copy runnable code for your language, escaping included.
The side-by-side breakdown lists every match with each group's captured text labeled, which ends the guessing about which parenthesis grabbed what.
Yes: one click exports working snippets for Python, JavaScript, R, Java, and more, with the pattern properly escaped for each language's string rules.
Usually escaping (backslashes doubling in string literals) or flavor differences between engines. The exported code handles the escaping correctly, which eliminates the most common culprit.
Here, yes: the matching runs in your browser, so the log lines and user data you paste never travel. That is the difference between this and testing on a server-side regex site.