遇到一个Firefox与IE执行不同的正则解析

| | Comments (0) | TrackBacks (0)
var str = '<font color="#ff0000" face="Arial Narrow" size="1">\
gfdjdsfl;dsjfdsl\
</font>'; var arr =
/<font\s+
(?:(size="[^"]*?"\s*)|(color="[^"]*?"\s*)|(face="[^"]*?"\s*))+
\s*>
((?:(?!<font>).)*?)
<\/font>
/.exec(str); // 由于显示问题,因此格式化为当前显示方式 alert(arr); // Firefox 与 IE的结果不一致。

此处暂时标注。

End.

0 TrackBacks

Listed below are links to blogs that reference this entry: 遇到一个Firefox与IE执行不同的正则解析.

TrackBack URL for this entry: http://www.tracesoul.com/mt-tb.cgi/19

Leave a comment

About this Entry

This page contains a single entry by Hangring published on November 28, 2007 4:29 PM.

基于非本能 was the previous entry in this blog.

SQLite Browser界面预览 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.01