1. Enter a pattern
Type a regular expression without the surrounding slash characters. For example, use \bword\b instead of /\bword\b/g.
Test JavaScript regular expressions against sample text, inspect match counts and capture groups, try common flags, and catch invalid pattern errors before using a regex in code.
Enter a JavaScript regex pattern without wrapping slashes, choose flags, and add sample text.
This tester uses your browser's JavaScript RegExp behavior. Other regex engines such as PCRE, Python, Java, and .NET may differ.
Review matches, index positions, capture groups, and pattern errors.
Ready. Enter a regex pattern and sample text to test matches.
Format, decode, preview, and inspect developer content near your regex workflow.
Use the tester as a lightweight browser-based JavaScript RegExp sandbox before copying a pattern into code.
Type a regular expression without the surrounding slash characters. For example, use \bword\b instead of /\bword\b/g.
Select flags such as global, case-insensitive, multiline, dotAll, or unicode, then paste realistic sample text.
Check the match count, positions, capture groups, and invalid-pattern messages before using the regex elsewhere.
Regex testing is most useful when you check a pattern against messy, realistic examples rather than one perfect string.
Try email-like, URL-like, ID-like, or label patterns before adding them to scripts, forms, or cleanup workflows.
Inspect which text is matched, where each match starts, and whether capture groups return the values you expect.
Test how global, case-insensitive, multiline, dotAll, and unicode flags change JavaScript RegExp matching.
This tool uses browser JavaScript RegExp behavior. Do not assume every programming language or regex engine will match exactly the same way.
PCRE, Python, Java, .NET, and browser JavaScript regex engines can differ in supported syntax and edge-case behavior.
Very large input and poorly designed patterns can be slow. Test with realistic examples and simplify risky expressions.
Regex is good for targeted matching, but complex nested HTML, JSON, or programming languages usually need parsers.
It uses the browser JavaScript RegExp engine. Other engines such as PCRE, Python, Java, and .NET may support different syntax or edge-case behavior.
Yes. When a match includes capture groups, the results show numbered groups under the matching line.
The tool shows a readable invalid-pattern message and clears the error after you fix the pattern.
Regex can be useful for small targeted matches, but complex nested HTML or JSON should be handled with a parser or a dedicated formatter.