update regexp and test to match \r\n or \n