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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:42:141472browse

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

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

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

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

/@(.+):/iU

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

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
Previous article:二维数组判断值雷同Next article:PHP 施行linux 命令