Regex Tester
Test, debug, and evaluate regular expressions in real-time with flag toggles, live match highlighting, group extraction, and string replacement.
No matches found yet.
How to Use Regex Tester
- Enter Regular Expression: Type your pattern in the regex bar and toggle flags (Global 'g', Case Insensitive 'i', Multiline 'm', DotAll 's', Unicode 'u').
- Paste Test String: Enter sample text in the test string workspace to test your pattern.
- Review Live Highlights & Groups: Matches highlight instantly in yellow with start/end indices and capture group extractions.
- Test String Replacement: Optionally type a replacement string (e.g. $1, $2) to preview live substitution results.
Frequently Asked Questions
Which JavaScript regex flags are supported?
It supports g (global match), i (case insensitive), m (multiline ^ and $), s (dotAll . matches newlines), and u (full Unicode code points).
What presets are included in the pattern library?
Built-in presets include Email address, URL / website link, US phone number, IPv4 address, Hex color codes, ISO date (YYYY-MM-DD), UUID / GUID, and HTML tags.
How do capture groups work in the substitution tool?
Use $1, $2, etc., in the replacement input to insert matched capture group contents, or $& to insert the entire matched substring.
Is my test text sent over the internet?
Never. Pattern compilation and string evaluation execute directly in your browser's local JavaScript RegExp engine.