100% in your browser · no sign-up · no uploads
Regex that works
in every language.
Test a pattern live, see it as a diagram, and get it converted for JavaScript, Python, PHP, Java, Go, C#, Rust, Ruby, with a clear warning and a working alternative when a language can't do it.
- languages
- 8languages
- tested patterns
- 150tested patterns
- lessons
- 30lessons
- uploads
- 0uploads
Test text (live, JavaScript engine)
Invoice 2026-01-15, due 2026-02-01
re.compile(r'(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})')Works in Python · Converted named groups to (?P<name>…) syntax for Python.
Playground
Pick a sample or paste your own text. Results update as you type.
Search anything with Ctrl K
Why RegexLab
More than a tester
One private toolkit for writing, checking, porting and learning regex.
- “Will it work in Go?” answeredSwitch language and the pattern, flags, replacement and code convert. If a feature is missing (lookbehind in Go, \p{L} in Python), you get a plain-English alternative that works.
- Plain English to regex, offlineDescribe it or paste an example. Get loose, balanced and strict versions with examples that are actually run, without sending anything to an AI service.
- Pakistan-ready patternsCNIC, 03XX mobiles, +92 numbers, JazzCash/Easypaisa labels, number plates, PKR amounts and Pakistani IBANs, each with honest limits.
- WhatsApp Chat ExtractorTurn an Android or iPhone chat export into a table with per-person stats, links, numbers and emails. CSV in one click.
- See the pattern as a diagramA railroad diagram shows groups, choices and repeats at a glance, next to a token-by-token explanation and a drag-and-drop Visual Builder.
- Private by designNo accounts, no analytics, no uploads. Matching runs in a Web Worker with a 500 ms safety timeout, so even a catastrophic pattern cannot freeze the page.
How the Playground works
Pick your language in the top bar. The pattern box shows the delimiters that language uses, and the flag buttons show only the flags that language can express; hover a flag to see how it is written there. When you switch language, named groups, named backreferences and redundant escapes are converted automatically, and anything that cannot be converted safely is reported instead of silently changed.
Use Test / Extract to list every match with its capture groups, Replace to preview substitutions with $1 or $<name>, Split to cut text into pieces, and Validate to check that the whole input matches. Export results as CSV, JSON or TXT. Not sure where to start? Try the Regex Generator, browse the Pattern Library, or follow the 30 free lessons.
Frequently asked questions
Does RegexLab upload my text anywhere?
No. Matching runs in a Web Worker inside your browser tab. RegexLab has no server-side processing, no accounts and no analytics, so the text you paste is never sent anywhere.
Which regex engine does the live preview use?
The preview always runs on your browser's JavaScript engine, because that is the only engine a browser can execute. For the other seven languages RegexLab converts the pattern, flags, replacement and code, and warns you about features the language does not support.
What happens if my pattern causes catastrophic backtracking?
Every run is limited to 500 ms. If the limit is reached, the worker is terminated and replaced with a fresh one, you see a timeout message, and the page stays responsive. RegexLab also shows a static warning for risky shapes such as (a+)+.
Can I share a pattern with someone?
Yes. Share link copies a URL with the pattern, flags, language and mode. The test text is included only when it is 2,000 characters or shorter, so long or private text is not put in the link.