Practical guide
How to use Regex Tester
Regex Tester provides a fast place to build and inspect JavaScript regular expressions. Matches are highlighted in context and listed with indexes and capture groups, which makes subtle pattern behavior easier to understand.
Step by step
- Enter a pattern without surrounding slash delimiters.
- Choose JavaScript flags such as g, i, m, s, u, or y and add representative test text.
- Run the test and inspect highlighted matches, indexes, and captured groups.
Example
Input
Pattern: \btool\w* · Text: tools, toolkit, taskResult
Matches: tools; toolkitHow it works
The pattern is compiled with the browser's JavaScript RegExp engine. Global matching is enabled for the result list so every occurrence can be shown, while other requested flags are preserved.
Important limitations
- JavaScript syntax and features can differ from PCRE, Python, Java, or .NET regex engines.
- A poorly designed expression can be slow on large or adversarial text.
Frequently asked questions
Should I include /pattern/ delimiters?
No. Enter only the pattern and place flags in the separate flags field.
Why does the pattern work elsewhere but not here?
The other environment may use a different regex engine or escaping convention.