首页 > PHP中关于HTML正则

PHP中关于HTML正则

`<imgsrc="http://a.com/aa.jpg"
alt="x11
"title="x12"
/>
<a herf="http://a.b.com">
ZZZZ</a>
`

HTML块(代码在一行,无空格),很多标签,很多双引号,如何获取<imgsrc>标签下 alt=的值,如X11,X21,x31. 用正则


Don't try to parse HTML using regex. Find an HTML parser please.

【热门文章】
【热门文章】