Skip to content

Regex Tester

Test and debug regular expressions with live highlights.

Runs in your browser

Type a pattern and some test text. Matches are highlighted instantly with named and numbered capture groups listed below.

Test arnaud.app: free, fast, private online tools.

8 matches

  1. #1 @ 0Testgroups: ["Test"]
  2. #2 @ 5arnaudgroups: ["arnaud"]
  3. #3 @ 12appgroups: ["app"]
  4. #4 @ 17freegroups: ["free"]
  5. #5 @ 23fastgroups: ["fast"]
  6. #6 @ 29privategroups: ["private"]
  7. #7 @ 37onlinegroups: ["online"]
  8. #8 @ 44toolsgroups: ["tools"]

How to use it

  1. Type a pattern

    Drop your regex into the pattern field. You can include named capture groups like `(?<word>\w+)`.

  2. Set flags

    g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), y (sticky). Default is `gi`.

  3. Paste test text

    Drop sample text. Matches highlight inline and group contents list below.

What is it?

A regex (regular expression) is a compact pattern language for matching text. A regex tester compiles your pattern, runs it against a test string, and shows every match - including which substrings each numbered or named capture group matched. Live highlighting makes it possible to iterate on a tricky pattern without round-tripping through your code editor and a debugger.

When to use it

Whenever you're writing a non-trivial regex: extracting fields from log lines, validating user input, building search-and-replace rules, parsing CSV cells, scraping HTML attributes, or migrating data between schemas. It's also the fastest way to test someone else's regex when you inherit a codebase or copy a snippet from Stack Overflow.

Common mistakes

Forgetting the `g` flag - without it, exec returns only the first match. Greedy quantifiers (`.*`) that swallow too much; use `.*?` for non-greedy. Anchors (`^` and `$`) behaving differently with the `m` flag. And the biggest one: trying to parse HTML or JSON with regex - use a real parser instead, regex can't handle nested structures.

FAQ

Which regex flavour does this support?
JavaScript regex (ECMAScript). If you need PCRE or Python regex, the syntax is very similar but lookbehinds and Unicode property escapes behave slightly differently.

More in this category