从字符串中获取一个字符串之后的字符串 [英] Get the string after a string from a string

查看:70
本文介绍了从字符串中获取一个字符串之后的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从这样的字符串中仅获取 important_stuff 部分的最快方法是什么:

what's the fastest way to get only the important_stuff part from a string like this:

bla-bla_delimiter_important_stuff

_delimiter_始终存在,但是字符串的其余部分可以更改.

_delimiter_ is always there, but the rest of the string can change.

推荐答案

此处:

$arr = explode('delimeter', $initialString);
$important = $arr[1];

这篇关于从字符串中获取一个字符串之后的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆