Agreed, whether `\n` in the file represents something specific or a `` followed by an `n` is kind of out of scope. One (imperfect) solution is a more complex regex, e.g. `((?<=[^\])|^)n` -- but note that this "simple" version won't handle `\n` correctly.