Guide · Developer

How to Test Regular Expression (Regex) Patterns Online

Writing a regex to validate an email or phone number, but not sure if the pattern is correct? Instead of trial-and-error directly in production code, test it here first and see the results in real time.

Regex Tester shows exactly which parts of a text match your regex pattern — highlighted inline with the rest of the text — plus the detail of each match, including capture groups if your pattern uses parentheses.

Try It Now

Regex Tester — MEA Tools

Test a regex pattern right in your browser, with matches highlighted instantly.

Open Regex Tester →

Steps to test a regex

  1. Open tools.meaecosystem.com/regex-tester.
  2. Type your regex pattern into the pattern field.
  3. Check the flags you need: g to find all matches (not just the first), i to ignore case, m for multiline mode.
  4. Paste or type your test text into the text field.
  5. Parts matching the pattern are highlighted instantly, and the total match count is shown.
  6. If your pattern uses parentheses for capture groups, the detail of each match (including each group's content) appears below.

The g, i, m flags — when should you use them?

The g (global) flag is needed when you want to find every occurrence of the pattern in the text, not just the first one found — usually enabled by default. The i flag is useful when you don't care about case, like searching for a word regardless of whether it's written in upper or lower case. The m flag changes how ^ and $ behave so they match the start/end of each line instead of just the start/end of the whole text — useful for multi-line text.

Why doesn't my pattern match even though it looks correct?

The most common cause: forgetting to escape a special regex character (like a period or parenthesis you meant to search for literally, not as regex syntax), or a needed flag that wasn't checked. Try highlighting your test text with a simpler pattern first, then gradually add complexity until you find the problematic part.

Frequently asked questions

Is my pattern and text sent to a server?

No. Regex testing runs directly in your browser using JavaScript's built-in regex engine.

Is every kind of regex syntax supported?

This tool uses the browser's built-in JavaScript regex engine, so the supported syntax follows the JavaScript regex standard — there may be small differences if you compare it to regex in other programming languages like Python or PHP.

What's a capture group?

A capture group is a part of a regex pattern marked with parentheses, used to "capture" and extract a specific part of the matched text, rather than just knowing whether there's a match overall.