Home Regex tester

Regex tester

Flags g, i, m, s, and u are here, plus common patterns. It stops after 10,000 matches.

Common patterns

Why this exists

You can check whether a log line, an address, or a date fits a pattern before running it in code.

What a pair of parentheses captured is listed next to the match.

  1. 01How to use it

    Put the pattern between the slashes and choose the flags.

    Matching stretches in the text below are colored, and captured groups are listed apart.

  2. 02What you get

    The date example finds five places, such as 2024-03-15 and 2024/12/31.

    Email, URL, IP, and Korean phone patterns can be filled in at once.

    Entered2024-03-15

    날짜 5
  3. 03Worth knowing

    Without g, only the first match appears.

    A grammar error is explained in a sentence: parentheses, a range, or a flag.

Questions

QDoes the text leave this browser?
ANo. The trial finishes in the browser you have open.
QWhy does it stop after 1 second?
ANested repeats can grow without end, so it cuts off before the page freezes.
QWhere do the groups appear?
AOnly matches that captured something in parentheses are listed below, up to 50.
  • # regex
  • # regular expression
  • # flags
  • # groups