Replace the six self.tasks.remove calls with one regex removal