Fixed regex for case when last canceled/done task doesn't ended with new line