Skip to content
{//}nullpath

Regex Tester

0 requests sent since load
Pattern

Pattern

Flags

Mode

Replacement

matches

Text to test

About regex testing

Regular expressions are the standard tool for validating input, extracting substrings, and rewriting text — and the fastest way to get them right is to iterate live against real samples. This tester runs JavaScript's native RegExpengine in your browser: type a pattern, watch matches highlight as you type, inspect capture groups, and flip to replace mode to see a rewrite applied.

Flags

g matches every occurrence (highlight mode forces it so all matches appear), i ignores case,m makes ^and $ match line starts and ends,s lets .match newlines, u switches to Unicode semantics, and y makes matching sticky to the previous position.

Zero-width matches

A pattern like a* can match an empty string, which on many sites makes a regex tester hang or flood the page with zero-width results. This tool advances past zero-width matches automatically and skips them in the highlight, so you can experiment freely with quantifiers like* and ?.

Related tools

Validate the result against structured data with the JSON formatter, or build a reusable config in the JSON to YAMLconverter.

FAQ

Can regex testing hang my browser?

No. Patterns that can match empty strings (like /a*/g) are handled with a guard that advances past zero-width matches, and the tool caps runaway matching.

Is my pattern or text sent anywhere?

No. Matching uses native JavaScript RegExp entirely in your browser — nothing is uploaded.