use match() instead of split() to split both \r and \n line end