【发布时间】:2011-12-02 02:00:25
【问题描述】:
我在将 html 属性 (在各种 html 标签中) 与正则表达式匹配时遇到问题。为此,我使用了以下模式:
myAttr=\"([^']*)\"
HTML sn-p:
<img alt="" src="1-p2.jpg" myAttr="http://example.com" class="alignleft" />
它从myAttr 结尾/> 中选择文本,但我需要选择myAttr="..." ("http://example.com")
【问题讨论】: