Skip to content

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
One pattern · 8 languages

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.

Open in the Playground

Playground

Pick a sample or paste your own text. Results update as you type.

Why RegexLab

More than a tester

One private toolkit for writing, checking, porting and learning regex.

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.