我需要什么正则表达式delete all the expired accounts
。
Name: John Smith
Address: 123 Sample Road
Country: England
Membership Expires: January 26, 2023, 9:35 am -288 Days
Plan: Platinum
Payment Method: American Express
Name: Paul Mitchell
Address: 911 Unknown Road
Country: USA
Membership Expires: October 7, 2024, 10:23 am 331 Days
Plan: Gold
Payment Method: Visa
Name: David Beckham
Address: 666 Example Road
Country: Scotland
Membership Expires: August 30, 2023, 6:03 pm -72 Days
Plan: Silver
Payment Method: Mastercard
Name: Frank Bruno
Address: 999 Random Road
Country: France
Membership Expires: April 19, 2024, 10:41 pm 160 Days
Plan: Bronze
Payment Method: PayPal
我想要的是:
Name: Paul Mitchell
Address: 911 Unknown Road
Country: USA
Membership Expires: October 7, 2024, 10:23 am 331 Days
Plan: Gold
Payment Method: Visa
Name: Frank Bruno
Address: 999 Random Road
Country: France
Membership Expires: April 19, 2024, 10:41 pm 160 Days
Plan: Bronze
Payment Method: PayPal
谢谢
^Name:(?:(?!Name:|-).)+-\d+ Days(?:(?!Name:|-).)+(?=Name:|\z)
LEAVE EMPTY
. matches newline
解释:
截图(之前):
截图(之后):
演示与说明