Regex Tester

Test a regular expression live — matches highlighted, groups listed

Test string

matches

Free Online Tool

Regex Tester — Complete Guide & Instructions

MakeCard Regex Tester evaluates a JavaScript regular expression against your test string in real time. Type a pattern, toggle the g, i, m and s flags, and every match is highlighted inline while a numbered list below shows each match, its position, and any capture groups. It is a fast, private sandbox for building and debugging patterns before dropping them into code.

How to Use Regex Tester

  1. 1 Type your pattern into the Pattern field (e.g. \b\w+@\w+\.\w+).
  2. 2 Toggle the flags you need — g (global), i (case-insensitive), m (multiline), s (dot-all).
  3. 3 Paste your test string into the Test string area.
  4. 4 See matches highlighted in the preview and listed with index and capture groups.
  5. 5 Refine the pattern — matches update live as you type.

Key Features & Capabilities

  • Live matching — results update on every keystroke.
  • Inline highlighting of every match in the test text.
  • Numbered match list with text, index and capture groups.
  • Flag toggles: g (global), i (ignore case), m (multiline), s (dot-all).
  • Clear error display for invalid patterns.
  • Everything runs locally — patterns and text stay on your device.

Supported Formats & Specifications

Parameter Specification
Engine JavaScript RegExp (the same engine your web code uses)
Flags g · i · m · s
Match Details Matched text, index, and capture-group values
Match Cap First 500 matches displayed
Processing Client-side, real-time

Practical Everyday Use Cases

  • Building a validation regex for email, phone or custom inputs.
  • Debugging why a pattern matches too much or too little.
  • Verifying capture groups extract the right substrings.
  • Testing multiline and dot-all behavior before shipping code.
  • Learning regex interactively with instant feedback.

Pro Tips for Best Results

  • Start with the g flag on — without it you only see the first match.
  • Remember \b for word boundaries — it stops partial matches inside longer strings.
  • Check the index values to confirm matches land where you expect.
  • The engine is JavaScript's — syntax for lookbehind, named groups, etc. follows JS rules, not PCRE.

Common Problems & Solutions

Check escaping — backslashes need a single \ here (unlike code strings). Also try the i flag if case is the issue.

Turn on the g (global) flag — it is required to see every match.

The syntax is off — look for unbalanced (), [], or an illegal escape; the message points to the problem.

Privacy & Security

100% Client-Side Execution

Patterns and test text are evaluated entirely in your browser — nothing is sent to a server.

No server uploads No data logging Safe for personal documents
FAQ Section

Frequently Asked Questions

Everything you need to know about using Regex Tester

Type the pattern and paste your test string — matches are highlighted live with positions and capture groups listed below.

g finds all matches, i ignores case, m makes ^ and $ match line starts/ends, and s lets the dot match newlines.

JavaScript's RegExp engine — patterns behave exactly as they would in web code.

They appear in the match list under each numbered match as groups: [...].

In code, backslashes inside string literals need doubling (\d → "\\d"); here you write the raw pattern.

Related FreeToolsBazaar Tools

Ready to Use Regex Tester?

100% free, browser-based, and private. No installation, registration, or file upload to external servers required.

Start Using Regex Tester