Regex Pattern Review

Check JavaScript regex syntax and spot patterns worth testing more carefully

Regex Pro
Professional Tools
.*

Patterns to Review:

Pattern Review

-
Heuristic Complexity
-
Heuristic Backtrack Risk
-
Heuristic Simplicity
-
Review Level

Review Suggestions

Review a pattern to see suggestions.

Continue with your pattern

This review uses simple rules. It does not measure execution time or prove a pattern safe. Test suggested changes against matching and nonmatching examples.

Open Regex Tester to paste and test your pattern, or build a new pattern.

How to review a regex pattern

Paste a JavaScript regex pattern without surrounding slashes and select Analyze Pattern. The page checks that the syntax compiles, then flags a few broad or repeated constructions. For example, (a+)+b has nested repetition: a long string of a characters without a final b may require extensive backtracking in some engines. A plain .* does not by itself prove that a pattern is slow.

Suggestions are starting points, not automatic rewrites. Change a copy of the pattern, compare both versions with positive and negative examples in the Regex Tester, and benchmark risky cases outside the browser's main thread before using the pattern with untrusted input.