← Free online tools

Developer tool

Regex Tester

Test JavaScript regular expressions with live highlights, capture groups, replacement preview, quick examples, validation errors, and copy-ready output.

Runs locally

Your pattern and sample text stay in the browser. Nothing is uploaded for matching.

//g
Flags:
Quick patterns:

Enter a pattern to see results.

よくある質問

Q. 正規表現のフラグ「g」「i」「m」の違いは?

A. gはグローバル(全マッチを検索)、iは大文字小文字を無視、mはマルチライン(^/$が各行の先頭・末尾にマッチ)を意味します。複数フラグは組み合わせて使用できます。

Q. メールアドレスのバリデーションに使える正規表現は?

A. シンプルなパターンとして /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/ が使われます。ツール上部のプリセットからも選択可能です。

Q. キャプチャグループとは何ですか?

A. 正規表現内で()で囲んだ部分をキャプチャグループといいます。マッチした部分文字列を個別に取得・参照するために使われます。(?:)は非キャプチャグループです。

Examples

Start from email, URL, phone, IPv4, or ISO date presets.

Capture groups

Inspect group values and match indexes for each result.

Replace preview

Test substitutions before using a pattern in production code.

よくある質問

Which regex engine does this use?

It uses JavaScript RegExp in the browser, so behavior matches modern JavaScript regular expressions.

Can I test replacements?

Yes. Enter a replacement string and use JavaScript replacement tokens such as $1 and $2 for capture groups.

Can I copy the output?

Yes. The tester includes copy actions for the current pattern and match summary.

Is my text uploaded?

No. Pattern validation, matching, replacement, and copy actions run locally in your browser.

Related Tools

cc-tools publishes 142 free online tools.