I'm using javascript regexp to replace newline characters with html paragraphs. In FireFox, Safari and Chrome I have no problem, but in IE8 it fails to 开发者_如何学运维find any newline characters at all. I have tried both /\n/g
and /\r\n/
but without success. Has anyone else had a similar problem?
Some things you could try:
/[\012\015]+/
/[\x0A\x0D]+/
/[\r\n]+/
/(\012|\015)+/
/(\x0A|\x0D)+/
/(\r|\n)+/
精彩评论