Home  >  Article  >  Backend Development  >  求助正则

求助正则

WBOY
WBOYOriginal
2016-06-23 14:07:48980browse

有一段文本是这样的:
"1111


2222


3333aaaaaccccc
aaaabbbbb


"
怎么把
之间的匹配出来,如array('0'=>'1111','1'=>'2222','2'=>'3333aaaaccccaaabbb')?


回复讨论(解决方案)

貌似split()更方便

怎么弄啊?写不来这种有换行的?高手帮帮忙。

用split()出现了一个警告,Deprecated: Function split() is deprecated in D:\xampp\htdocs\tool\splitBr.php on line 24。可以分割,怎么消除警告?

查了下,split()函数过时了,用preg_split()可以了。

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