哪位高手帮改个正则

WBOY
Release: 2016-06-13 12:41:48
Original
830 people have browsed it

谁帮改个正则?
这是要匹配的内容:

 

<br />
<dl><br />
	<dt>2013</dt><br />
	<dd>row1</dd><br />
	<dd>row2</dd><br />
	<dd>row3</dd><br />
</dl><br />
<dl><br />
	<dt>2014</dt><br />
	<dd>row1</dd><br />
	<dd>row2</dd><br />
</dl><br />
Copy after login


要匹配dl,并且匹配dl下的dt,和所有的dd,

我是这样写的:

<dl>\s+<dt>(.*?)</dt>(\s+<dd>(.*?)</dd>\s+)*?</dl>
Copy after login


但是这个匹配出的结果不太对,dd始终只匹配到了最后一个。这个表达式应该怎么修改呢?
正则

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