Home > Backend Development > PHP Tutorial > 怎么取出两个字符之间的内容

怎么取出两个字符之间的内容

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:42:14
Original
1479 people have browsed it

如何取出两个字符之间的内容
一个字符串:
$str = [email protected]:[email protected]:第一次转发

要求:[email protected]:之间的字符串放入数组中。

这个问题困扰2天啦,希望有好心人可以解决下

------解决方案--------------------
两天?都在看什么呢?不知道正则表达式么?
用pcre_match_all()

/@(.+):/iU

代码自己写,自己把手册正则表达式部分看明白了,不然你人生中两天就白活了

Related labels:
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