以下は、私の長いテキストからの抜粋です。
As a young researcher, he is required:
\n ÷ to read at least three theses\n ÷ to meet his tutor or supervisor
once a week\n ÷ to join seminars\n
÷
ここで、で始まり で終わるブロックを見つけて、とで\n
置き換えたいと思います。したがって、たとえば、上記の抜粋は次のようになります。÷
÷<font color="blue">
\n
</font>\n
As a young researcher, he is required:
\n ÷<font color="blue"> to read at least three theses</font>\n ÷<font color="blue">
to meet his tutor or supervisor once a week</font>\n ÷<font color="blue"> to join seminars</font>\n
これまでのところ、TextWrangler でこれらの Grep を使用して検索して置換しています。
(÷[^ \t/<>]*?).*?([^ \t/<>]*?\\n)
<font color="blue">\1\2</font>\3
必要なテキスト ブロックは正常に見つかりましたが、置換が期待どおりに機能しません。
TextWrangler を使用していますが、BBEdit または Notepad++ にアクセスできる場合があります。
この問題を解決するのを手伝ってもらえますか? どうもありがとうございました。
アップデート
DesertEagle のおかげで、私は解決策を見つけました。コードは次のとおりです。
÷([^\\n]+)\\n
÷<font color="blue">\1</font>\\n