๐Ÿ”ค

Regular Expression Tester โ€” Token Visual ยท Lookaheads ยท Diff Mode

Real-time ยท 26 features ยท AI explain ยท Unit tests ยท Diff mode ยท JS/Python/PHP ยท 100% browser

REGEX PATTERN
//g
FLAGS
TEST TEXT
0 matches
 
Ctrl+L ClearCtrl+S DownloadCtrl+Shift+C Copy matchesP PinF Fullscreen
๐Ÿ’ก

The most complete regular expression tester online. Token block visual showing pattern structure, lookahead/lookbehind color coding, regex diff (old vs new), multi-string testing, and unit tests with automatic PASS/FAIL.

What is a Regular Expression?

A regular expression (regex) is a sequence of characters that defines a search pattern. Used for validation, parsing, text manipulation, and data extraction in virtually every programming language โ€” JavaScript, Python, PHP, Java, and more.

How to Use This Regex Tester

Type your regex pattern in the input field. Matches highlight in real-time in the test text panel. Use the flags (g/i/m/s/u/y) to modify matching behavior. Switch between Test, Replace, Unit Test, Diff, and Multi-string modes using the tabs above.

Frequently Asked Questions

What is the regex diff feature?

Regex Diff mode lets you compare two regex patterns (old and new) against the same test strings. You can see which strings now match, which stopped matching, and which are unaffected โ€” perfect for safe regex refactoring.

How does lookahead highlighting work?

Lookaheads (?=...) and lookbehinds (?<=...) are visually distinguished in the token block view with cyan color. Negative lookaheads (?!...) and lookbehinds (?<!...) are shown in red. The match highlight also shows where lookaheads apply.

What is the multi-string test mode?

Multi-string mode lets you paste multiple test strings (one per line) and instantly see which ones match (โœ…) and which don't (โŒ), along with the number of matches per string. Great for testing edge cases in bulk.