求一段正则替换.该如何处理

WBOY
Release: 2016-06-13 13:33:29
Original
712 people have browsed it

求一段正则替换..
A-1要删除的内容B-1
需要保留的内容
A-2要删除的内容B-2
需要保留的内容
A-4要删除的内容B-4
需要保留的内容
A-3要删除的内容B-3
需要保留的内容
A-8要删除的内容B-8
.
.
.
需要保留的内容
A-n要删除的内容B-n


其中 n = 正整数 ,内容里会包含html标签,也包含换行等等...
求大虾指教.

------解决方案--------------------
/A-\d.*?B-\d/

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