I rolled these hand-forged metal dice hundreds of times. How fair are they?

Windows formatted text: \r\n
UNIX formatted text: \n

\r?\n would get you both Windows formatted newlines and UNIX formatted newlines (I’ve had horrible files where the two were mixed :cold_sweat:). Unless you’re trying to remove the newline character(s), it’s easier to use $.

RegEx is a real pain for HTML anyway. I mean more of a pain than RegEx usually is.

4 Likes