数据匹配问题

WBOY
Release: 2016-06-06 20:31:46
Original
1010 people have browsed it

<code><page number="1" name="要闻" xml="page_74628.xml" image="page_74628.jpg" icon="thumb_01.jpg" wide="false" adfile="" adtype="0"></page>
<page number="2" name="新区新闻" xml="page_74629.xml" image="page_74629.jpg" icon="thumb_02.jpg" wide="false" adfile="" adtype="0"></page>
<page number="3" name="海山观察" xml="page_74630.xml" image="page_74630.jpg" icon="thumb_03.jpg" wide="false" adfile="" adtype="0"></page>
<page number="4" name="民生新闻" xml="page_74631.xml" image="page_74631.jpg" icon="thumb_04.jpg" wide="false" adfile="" adtype="0"></page>
<page number="5" name="新区财经" xml="page_74632.xml" image="page_74632.jpg" icon="thumb_05.jpg" wide="false" adfile="" adtype="0"></page>


Xml="(.*)" Image=
直接这样?
</code>
Copy after login
Copy after login

我想取出Xml的值,正则能循环匹配出全部吗?还是有其他妙招?

回复内容:

<code><page number="1" name="要闻" xml="page_74628.xml" image="page_74628.jpg" icon="thumb_01.jpg" wide="false" adfile="" adtype="0"></page>
<page number="2" name="新区新闻" xml="page_74629.xml" image="page_74629.jpg" icon="thumb_02.jpg" wide="false" adfile="" adtype="0"></page>
<page number="3" name="海山观察" xml="page_74630.xml" image="page_74630.jpg" icon="thumb_03.jpg" wide="false" adfile="" adtype="0"></page>
<page number="4" name="民生新闻" xml="page_74631.xml" image="page_74631.jpg" icon="thumb_04.jpg" wide="false" adfile="" adtype="0"></page>
<page number="5" name="新区财经" xml="page_74632.xml" image="page_74632.jpg" icon="thumb_05.jpg" wide="false" adfile="" adtype="0"></page>


Xml="(.*)" Image=
直接这样?
</code>
Copy after login
Copy after login

我想取出Xml的值,正则能循环匹配出全部吗?还是有其他妙招?

<code>preg_match_all搞定··
</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template