去除「FWD」,「RE」等,我想清理它,擺脫「Re:」,「Fwd」和其他垃圾。例如,「[Fwd] Re:傑克和吉爾的婚禮」應該變成「傑克和吉爾的婚禮」。正則表達式/代碼從電子郵件主題
有人必須這樣做過,所以我希望你可以指向我的戰鬥測試正則表達式或代碼。
下面是一些需要清理的例子,發現於this page。該頁面上的正則表達式工作得很好,但並不完全在那裏。
Fwd : Re : Re: Many
Re : Re: Many
Re : : Re: Many
Re:: Many
Re; Many
: noah - should not match anything
RE--
RE: : Presidential Ballots for Florida
[RE: (no subject)]
Request - should not match anything
this is the subject (fwd)
Re: [Fwd: ] Blonde Joke
Re: [Fwd: [Fwd: FW: Policy]]
Re: Fwd: [Fwd: FW: "Drink Plenty of Water"]
FW: FW: (fwd) FW: Warning from XYZ...
FW: (Fwd) (Fwd)
Fwd: [Fwd: [Fwd: Big, Bad Surf Moving]]
FW: [Fwd: Fw: drawing by a school age child in PA (fwd)]
Re: Fwd
'轉發:回覆:FWD是一個縮寫(四輪驅動)' – 2012-02-05 22:41:27