in reply to Re: converting carriage returns to br tags (was: Simple Question for you guys)
in thread converting carriage returns to <br> tags (was: Simple Question for you guys)

FYI, the use of <br /> is intentional; it is an XHTML tag. XHTML is a rewrite of HTML conforming to the rules of XML.

By the way, I don't think that there would be any problems with using this substitution in practice: s/\r\n?|\n\r?/<br>/g; It is true that the match of \012\015 may be avoided with the substitution you suggested: s/\015\012|\015|\012/<br>/g; But with the former, you don't have to remember whether \015 or \012 is supposed to come first. :)