开发者

IE8 regexp finding newline characters

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)+/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜