TheDevTab
Tools

Keyboard shortcuts

Ctrl K
Search tools and guides
?
Show keyboard shortcuts
Escape
Close menus and dialogs

Regex Tester

Test regular expressions in your browser.

This runs in your browser. Nothing is uploaded.

Test regular expressions privately

TheDevTab gives you a focused JavaScript regex tester, and nothing is uploaded. Your pattern and test string stay in this browser while you work. Use Test to inspect matches and Replace to preview replacement text.

Use g for every match, i to ignore case, m for line anchors, s for dot matches across line breaks, and u for Unicode-aware matching.

Flags change the question you are asking

The g flag returns every match instead of stopping at the first one. Usei when letter case should not matter, and m when^ and $ should work on each line rather than only the full string. The s flag lets a dot include line breaks. The u flag enables Unicode-aware behavior. Test the same pattern with and without a flag when a result seems surprising.

Matching uses the JavaScript RegExp engine supplied by the browser. Syntax from PCRE, Python, or another engine may not work here. The tester shows matches and errors for a focused JavaScript check. It does not compile a server-side pattern or send the test string away.

Keep patterns specific

Some patterns become very slow when nested repetition and overlapping alternatives create many possible paths. This is called catastrophic backtracking. This page runs Test and Replace off the main thread and stops a run that takes too long, so the tab should stay usable. Still prefer clear boundaries and bounded repetition before putting a pattern in a request path or a log processor.

Review the match before using it

Start with a sample that includes a match, a near miss, and an empty line. Check whether the global flag is enabled, inspect the exact matched text, then copy the pattern into your code with the same flags. The input and pattern remain in this browser, and no network request contains the text you test.

FAQ

Does TheDevTab's Regex Tester upload my text?

No. The pattern matching runs in your browser, and TheDevTab does not upload or receive your pattern or test string.

Which regular expression syntax does this tester use?

It uses the JavaScript RegExp engine that ships with your browser, so patterns follow browser-supported JavaScript regular expression syntax. Test inspects matches, and Replace previews replacement text.

What do the regex flags mean?

g finds every match, i ignores letter case, m changes how ^ and $ work across lines, s lets a dot match line breaks, and u enables Unicode-aware matching.

Can I try the Regex Tester with a sample?

Yes. Select Sample to test a sample pattern against example text with global and case-insensitive matching enabled.

Can a regular expression become slow?

Yes. Nested repetition and overlapping alternatives can cause catastrophic backtracking on some inputs. This page runs the match off the main thread and stops it if it takes too long, so a bad pattern should not freeze the tab. Keep patterns specific and test them with realistic input before using them in a request path.