How to remove multiple lines with varying content?

Not an expert here, but check this action Anti-fy selection | Drafts Directory and then this forum post, see if it helps