Developer Tools
Regex Tester
Use our free Regex Tester to test and debug regular expressions with live matching, highlighting, and match details. Supports JavaScript regex syntax.
Test Regular Expressions with Live Matching
Enter a regex pattern and test string to see matches highlighted in real time. Supports JavaScript regex syntax with global, case-insensitive, and multiline flags.
How to Use
- Enter a regex pattern (without delimiters)
- Set flags: g (global), i (case-insensitive), m (multiline)
- Enter or paste your test string
- Click Test or use a common pattern preset
- View highlighted matches and details
Common Use Cases
- Validate form inputs
- Extract data from text
- Search & replace
- Parse log files
- Clean data
- Test before coding
Regex Quick Reference
| Pattern | Meaning | Pattern | Meaning |
|---|---|---|---|
. | Any character | \d | Digit [0-9] |
\w | Word char [a-zA-Z0-9_] | \s | Whitespace |
^ | Start of string | $ | End of string |
* | 0 or more | + | 1 or more |
? | 0 or 1 | {n,m} | n to m times |
[abc] | Character class | [^abc] | Negated class |
(abc) | Capture group | a|b | Alternation (or) |
\b | Word boundary | (?:abc) | Non-capture group |
FAQ – Regex Tester
What is a regular expression?
A regular expression (regex) is a pattern that describes a set of strings. It's used for searching, matching, and manipulating text in programming.
What regex flavor does this use?
This tool uses JavaScript's built-in RegExp engine. Most patterns are compatible with other languages, but some features (like lookbehind) may vary.
What do the flags mean?
g (global) finds all matches. i (case-insensitive) ignores case. m (multiline) makes ^ and $ match line boundaries.
Is my data safe?
Yes. All processing happens in your browser. Nothing is sent to any server.
Why is my regex slow?
Catastrophic backtracking can occur with nested quantifiers like (a+)+. Simplify patterns and avoid nested repetition on overlapping patterns.
Can I use capture groups?
Yes. Groups are shown in match details with their index and captured text. Use (?:...) for non-capturing groups.