Regex Tester

  1. Choose file
  2. Set options
  3. Get result

A regex tester online should show matches, groups, and syntax errors without sending your text to a server. Type a pattern, toggle g i m s flags, paste a test string, and read highlighted hits with capture groups. Slow patterns time out so the tab stays responsive.

A JavaScript regex, checked in this tab

GustKit Regex Tester runs a JavaScript RegExp in this browser tab. Type the pattern without slashes, tick Global (g), Ignore case (i), Multiline (m), or Dot matches newline (s), and paste the test string. Hits highlight as you type. There is no Test button and nothing is uploaded. A worker stops a slow pattern after 250 ms.

Four checkboxes, and one hit until Global (g) is on

Global (g), Ignore case (i), Multiline (m), and Dot matches newline (s) start unchecked. Without g, Matches lists a single hit. With g, the list continues until the text ends or 500 hits, and a note appears if more were waiting. An empty pattern still runs and can match an empty spot. If both boxes are blank, the panels hide.

Groups, indexes, and the English tokens (empty) and null

Parentheses fill Capture groups. A name such as (?<name>...) is labeled with that name. Each Matches row shows the match number plus the start and end indexes. A hit longer than 80 characters is cut to 77 in that list. The highlight still covers the whole span. An empty group prints (empty). A group that did not take part prints null.

How to test a regular expression in GustKit

  1. Type it in Regular expression. Do not wrap it in slashes. The field keeps the first 500 characters and does not warn about the cut.

  2. Tick Global (g) when you want every hit. Add Ignore case (i), Multiline (m), or Dot matches newline (s) only if the pattern needs them. They combine on one RegExp.

  3. Use Test string. The panels refresh as you type. Past 50000 characters, GustKit shortens the text and shows a note.

  4. Highlighted matches, Matches, and Capture groups sit under the fields. A bad pattern shows Syntax error. A slow one stops after 250 ms. Clear empties the pattern, the text, and the flags.

A JavaScript regex check that stays in the tab

  • JavaScript flavor

    The engine is the browser RegExp, not PCRE, Python, or .NET.

  • Only g, i, m, and s

    Those four checkboxes are the flags. There is no switch for u, y, or d.

  • Indexes on each hit

    A row gives the match number and the start and end positions in the shortened text.

  • Stop at 250 ms

    The worker ends the run so the tab can take input again. Shorten the string or drop nested quantifiers such as (a+)+.

  • Nothing uploaded

    Pattern and test text stay in this tab. For a JSON payload, open JSON Formatter. For a hash, open SHA-256 Hash.

  • No replace mode

    This page lists hits and groups. It does not rewrite the string. Encoding lives on URL Encode and Base64.

Questions about the regex tester

What flags does this regex tester support?

g finds every match, i ignores case, m makes ^ and $ work on each line, and s lets . match a newline. Flags combine on the same RegExp.

Why did matching stop with a timeout?

Some patterns on long strings can run for a very long time. GustKit runs the test in a worker and stops after a short limit so the tab stays responsive. Shorten the text or simplify the pattern.

Does my pattern or text leave the browser?

No. Testing runs in your browser tab. GustKit does not upload the pattern or the test string.

How do I see capture groups?

Use parentheses in the pattern. Each match lists numbered groups. Named groups like (?<name>...) appear with the name.

Does Global (g) change how many hits I see?

Yes. With Global (g) off, only the first match is listed. With it on, GustKit stops after 500 matches and shows a note if more remain.

Can I replace text or turn on the u flag?

No. There is no replace box, and the flag row is only g, i, m, and s.

Flags and limits on this regex tester

ItemWhat GustKit does
Global (g) offOnly the first match
Global (g) onEvery match, then a note after 500
Ignore case (i)Upper and lower case count as the same
Multiline (m)^ and $ apply on each line
Dot matches newline (s)A dot can match a line break
Pattern lengthFirst 500 characters, with no separate warning
Test stringShortened to 50000 characters, with a note
TimeThe worker stops the run after 250 ms
Replace or flag uNot on this page