Home >Backend Development >PHP Tutorial > 正则怎么匹配第一个的</p>和最后一个</p>

正则怎么匹配第一个的</p>和最后一个</p>

WBOY
WBOYOriginal
2016-06-13 12:47:281536browse

正则如何匹配第一个的

和最后一个
比如文章如下

1111111


2222222


33333333


4444444


55555555


66666666


7777777



匹配出

1111111

中的
和最后一段

7777777


正则如何弄?
Statement:
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