regex – Match linebreaks – n or rn? – Stack Overflow

Long story short, Linux uses n for a new-line, Windows rn and old Macs r. So there are multiple ways to write a newline. Your second tool (RegExr) does for example match on the single r. [rn]+ as Ilya suggested will work, but will also match multiple consecutive new-lines. (rn|r|n) is more correct.

Read More