PDFのミカタ

正規表現で文章をまとめて置換する

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

この記事のポイント
  • パターンを書く
  • 置換後の文字を入れる
  • 結果をコピー

正規表現テスター の「置換後の文字」を使うと、一致した部分をまとめて書き換えられます。

手順

  1. パターンを書く
  2. 置換後の文字を入れる
  3. 結果をコピー
「$1」は、かっこで囲んだ1番目の部分です。
正規表現テスターを使う(無料)

あわせて使えるツール

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

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

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

解説の一覧を見る

Replacing Text in Bulk with Regex

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

Key points
  • Write a pattern
  • Enter the replacement
  • Copy the result

The "Replacement" field in Regex Tester rewrites all matched parts at once.

Steps

  1. Write a pattern
  2. Enter the replacement
  3. Copy the result
"$1" stands for the first parenthesized part.
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