in reply to (Regex Madness) And you thought whitespace was easy.
When we type text, we might leave more than one blank line, but that still indicates one paragraph break. Or the line might not be empty but have a space on it, etc.
So, a whitespace sequence that contains at least two \n characters is replaced by \n\n, and all other whitespace sequences are replaced by single space, and leading/training whitespace is thrown away.
—John
|
|---|