regexp when reading, \n added when writing