看板 RegExp 關於我們 聯絡資訊
※ [本文轉錄自 perl 看板] 作者: kornelius (Kornelius) 看板: perl 標題: Re: [問題] Vim 的 RegExp 時間: Thu Sep 13 15:41:20 2007 發現用 \V 可以把後頭的 pattern 當作 normal text 比對 ( very nomagic ) \v 則以 very magic 所以如果要 (foo|bar) 就不需 :%s/\(foo\|bar\)//g 了 可以這樣 :%s/\v(foo|bar)//g :h pattern ※ 引述《kornelius (Kornelius)》之銘言: : 因為 Vim 的 RegExp 很難用。 : 想請問 是否可以改為 Perl-Compatible 的 RegExp 呢? : 譬如說 : :%s{foo}{bar}g : 謝謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.116.167.126
sintsu:水喔 09/14 10:30
-- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.192.52.94