2015-09-06 18 views
1


删除我有很多传入电子邮件 的,我想所有保存在记事本如何大规模使用正则表达式

[email protected] 
    12:56 AM (7 hours ago) 

    to me 
    Live => [email protected] | example1 

    [email protected] 
    6:31 AM (2 hours ago) 

    to me 
    Live => [email protected] | example2 

    [email protected] 
    6:31 AM (1 hours ago) 

    to me 
    Live => [email protected] | example3 

所以变成这样

Live => [email protected] | example1 
Live => [email protected] | example2 
Live => [email protected] | example3 

如何删除所有

[email protected] 
6:31 AM (1 hours ago) 

to me 

与正则表达式!

问题 使用正则表达式时应该使用什么代码? 请与演示regex101

回答

1

您可以使用这样的正则表达式:

[\s\S]*?(Live.*$) 

随着替换字符串:

$1\n 

Working demo

enter image description here

+0

谢谢:)多数民众赞成在工作 –

+0

@YogaTheÐevil's-NoCry乐于帮助 –