我在下面有一些这样的文本,我想要删除最后一个地址匹配,问题是这些地址有不同的格式,取决于文本:
我有这个:
To find out more about Groupon Goods, see the <a href="http://www.groupon.co.uk/faq"> FAQ</a>.\n\nUK-Bedding Returns:Albany Mill, Old Hall Street, Middleton, Manchester M241AG
UK-Bedding Returns:Albany Mill, Old Hall Street, Middleton
Manchester M241AG\n\n<a href="http://www.groupon.co.uk/terms_and_conditions"></a>
Built by gskinner.com with Fl
输出应该是这样的(我删除了最后一个“Albany Mill, Old Hall Street, Middleton Manchester M241AG”):
To find out more about Groupon Goods, see the <a href="http://www.groupon.co.uk/faq"> FAQ</a>.\n\nUK-Bedding Returns:Albany Mill, Old Hall Street, Middleton, Manchester M241AG
UK-Bedding Returns:\n\n<a href="http://www.groupon.co.uk/terms_and_conditions"></a>
Built by gskinner.com with Fl