去除“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