Home  >  Article  >  Backend Development  >  排除字符串里某字符第3次出现后面的所有字符,代码如何写

排除字符串里某字符第3次出现后面的所有字符,代码如何写

WBOY
WBOYOriginal
2016-06-13 11:33:26897browse

排除字符串里某字符第3次出现后面的所有字符,代码怎么写
排除字符串里某字符第3次出现后面的所有字符,代码怎么写

比如字符串“2你好2哈哈2对的啊哈哈哈”

就是排除第3个2后面的所有字符得到结果“2你好2哈哈2"

请知道的大哥直接给代码好吗谢谢了 

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