split lines by regex for better handling of line management