Fix regex to include previous pattern, with fixes