regex newline bug fixed