Emacsの正規表現は呪いです。 なんだあのバックスラッシュの連発は… Emacs大好きでもあの 正規表現 だけは許せないという人は 僕も含め、それなりの数がいると思われます。 そんなあなたにとっておきのパッケージを紹介します。 pcre2el.el は、以下の機能をもって呪わしき正規表現から救ってくれます。 Emacsの正規表現から PCRE へ変換 Emacsの正規表現から rx (S式による表現)へ変換 正規表現を分解して文字列リスト化 カーソル位置・regionの正規表現をrx形式に変換して解説! M-x re-builder でPCREに対応!! これはそもそもelispで書かれたPCREエミュレータであり、 Emacsの正規表現に変換できる範囲でPCREが使えます。 そもそもEmacsの正規表現とPCREは一対一対応ではないので、 完全にPCREの機能が使えるわけではないですが