PDFのミカタ

かっこ(グループ)で一部だけ取り出す

公開日:2026年10月19日|最終更新:2026年10月19日|運営者情報

この記事のポイント
  • かっこ付きのパターンを書く
  • 文章を入れる
  • グループを見る

正規表現テスター は、一致ごとに、かっこの中身を表示します。

手順

  1. かっこ付きのパターンを書く
  2. 文章を入れる
  3. グループを見る
「(\d+)年(\d+)月」なら、年と月を別々に取り出せます。
正規表現テスターを使う(無料)

あわせて使えるツール

この解説が役に立ったら、応援してもらえるとうれしいです。

応援する(300円)ほしい物リストで応援

同じツールの、ほかの解説

解説の一覧を見る

Capturing Parts with Parentheses

Published: Oct 19, 2026 | Updated: Oct 19, 2026 | About (Japanese)

Key points
  • Write a pattern with parentheses
  • Enter the text
  • See the groups

Regex Tester shows the contents of the parentheses for each match.

Steps

  1. Write a pattern with parentheses
  2. Enter the text
  3. See the groups
A pattern like "(\d+)-(\d+)" pulls out two numbers separately.
Use "Regex Tester" (free)

Tools that go well with this

If this guide helped, a small tip would mean a lot.

Send a tip (¥300)Send a gift (Amazon wishlist)

More guides for this tool

See all guides