Reduce lines using regular exp