Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Emacs では、数字のインスタンスの前にテキスト文字列を追加しようとしてい</a>1</h2>ます</a>Chapter 1</h2>。
</a>1</h2>
</a>Chapter 1</h2>
この正規表現を使用して一致を見つけることができます:</a>\([0-9]+\)
</a>\([0-9]+\)
文字列全体ではなく、既存の一致する数字を置換文字列で指定するにはどうすればよいですか?
\(andを正しく使用して、正規表現で (最初のキャプチャ グループであるため)\)置換文字列に書き込むことができるキャプチャ グループの数字を囲みました。\1したがって、置換文字列は次のようになります
\(
\)
\1
</a>Chapter \1