怎么删除这个?大规模删除正则表达式

时间:2015-03-24 09:45:24

标签: regex

我有一个Twitter账号数据,我想删除死亡列表并考虑到生活,如何删除正则表达式请使用regex101上的demo?

示例:

Live! => [ elfiegoh@gmail.com:hawkhgaw ] + [Name: kyandenohime - Following: 31 - Follower: 4 - Bio: Hello there ! ◉‿◉ ☆welcome to my personal art dump★ - Art trades and requests open - Requests :18 ~ - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Fri Dec 06 15:12:42 +0000 2013 [472 Days])]
Die! => [ hemiao01@gmail.com:takumimisaki ]
Live! => [ angie2002.stanford@gmail.com:cihuyers ] + [Name: һ∆яՊʘŋყ ʂƿ∆яҝ - Following: 7 - Follower: 0 - Bio: I am a - ժєՊⅈ₲ʘժ - ʂһ∆ժʘωһʊŋϮєя -ⅈŋⅈϮⅈ∆Ϯє -ƿʘϮϮєяһє∆ժ -ϮяⅈɞʊϮє -һєϮ∆ℓⅈ∆ŋ -Ϯһяʘŋєя -Ϯʄⅈʘʂ ʄ∆ŋ - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Sat Jun 18 12:11:09 +0000 2011 [1374 Days])]
Die! => [ farissirraj@gmail.com:jujulisirraj ]
Die! => [ liu_shumin_vanessa@moe.edu.sg:8522735 ]
Die! => [ backdoor@windowslive.com:123456 ]
Die! => [ asdf@asd.com:123456789 ]
Die! => [ progpro19@gmail.com:sami ]

我想删除带有大量死亡的列表,因为我有很多帐户 删除后:

Live! => [ elfiegoh@gmail.com:hawkhgaw ] + [Name: kyandenohime - Following: 31 - Follower: 4 - Bio: Hello there ! ◉‿◉ ☆welcome to my personal art dump★ - Art trades and requests open - Requests :18 ~ - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Fri Dec 06 15:12:42 +0000 2013 [472 Days])]
Live! => [ angie2002.stanford@gmail.com:cihuyers ] + [Name: һ∆яՊʘŋყ ʂƿ∆яҝ - Following: 7 - Follower: 0 - Bio: I am a - ժєՊⅈ₲ʘժ - ʂһ∆ժʘωһʊŋϮєя -ⅈŋⅈϮⅈ∆Ϯє -ƿʘϮϮєяһє∆ժ -ϮяⅈɞʊϮє -һєϮ∆ℓⅈ∆ŋ -Ϯһяʘŋєя -Ϯʄⅈʘʂ ʄ∆ŋ - Location: Empty - URL: Empty - Translator: No - Verified: No (Joined At Sat Jun 18 12:11:09 +0000 2011 [1374 Days])]

1 个答案:

答案 0 :(得分:0)

^Die.*?(?:\n|$)

试试这个。empty string。见。演示。

https://regex101.com/r/tJ2mW5/15