Regex Checker

Test a JavaScript regular expression against one input per line. Evaluation is capped to keep the page responsive.

Pattern and input

Complex expressions are stopped after one second; compiling does not guarantee a pattern is safe.
Allowed: d, g, i, m, s, u, v, y (no duplicates).

Results

InputResultMatch
No test run yet.

Test JavaScript regular expressions line by line

Regular expressions are powerful, but a pattern that looks correct can still match too much, miss an edge case, or use the wrong flag. This regex checker applies a JavaScript pattern to separate test lines and shows the result for each input.

What does the Regex Checker show?

It reports whether each line matches and displays the matched text. You can supply common JavaScript regex flags and compare positive, negative, and boundary cases in one run. Evaluation limits help prevent an expensive pattern from keeping the page busy indefinitely.

How to test a regex

  1. Enter the pattern without surrounding slash characters.
  2. Add only the JavaScript flags you need.
  3. Place one test value on each input line.
  4. Run the test and compare the result table with what you expected.

Who should use it?

Developers and QA engineers can verify validation rules, search patterns, log filters, and data-cleaning logic. Content teams and analysts may also find it useful for checking consistent codes, filenames, IDs, or text structures before using a pattern elsewhere.

Why test non-matching examples?

A useful regex must reject incorrect input as reliably as it accepts correct input. Include empty values, extra spaces, different letter cases, partial matches, and unusually long strings. These negative cases often reveal weaknesses that a few ideal examples will not.