正規表現テスター

リアルタイムでマッチハイライト付きの正規表現パターンをテスト。データはブラウザから送信されません。

Regex Pattern
Test Text
Match Results
Matches will appear here...
0 characters 0 matches

Regex Tester

This regular expression tester lets you write and validate regex patterns against sample text directly in your browser. All six standard JavaScript regex flags are available: global, case-insensitive, multiline, dotAll, unicode, and sticky. Matches are highlighted in real time so you can see exactly what your pattern captures.

The regex runs locally in your browser. The text you enter is not uploaded, stored, or sent to a server, so you can test patterns privately and quickly without changing your workflow.

How to use

  1. Type or paste a regex pattern into the Regex Pattern input field. You do not need to include the leading and trailing slashes.
  2. Select the flags you need: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), or y (sticky).
  3. Enter or paste your test text into the editor below.
  4. Matches are highlighted automatically. The match count appears in the status bar.
  5. Use Copy to copy the test text to the clipboard, Download to save it as a file, or Clear to reset everything.

What are regular expressions?

A regular expression (regex) is a sequence of characters that defines a search pattern. It is used for pattern matching within strings, such as finding specific words, validating formats like emails or phone numbers, or splitting text by complex delimiters.

JavaScript implements regex natively via the RegExp object. The same syntax works in most programming languages with minor variations. Learning regex is a core skill for text processing, data cleaning, log parsing, and input validation.

Input notes

Enter the regex pattern without delimiters (no /pattern/flags syntax). The flags are controlled by the checkboxes. Invalid patterns are caught and an error message is shown instead of crashing the tool.

Example

A simple pattern to find email-like strings in text:

--- Pattern ---
\b\w+@\w+\.\w+\b

--- Flags ---
g (global)

--- Test Text ---
Contact us at [email protected] or [email protected].
Invalid: @missing.com or user@

--- Matches Found ---
2 matches:
  1. [email protected]
  2. [email protected]