开发者

trim from first and last of string how do it [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

unset last item of array

i want do this without of expload, array_pop and array_shift


$item[$fieldneedle] = " node_os_disk_danger ";
$objectName = preg_split('/_/',$item开发者_Go百科[$fieldneedle]);
$objectName == "os_disk";

in this example i need os_disk


/(?:^.*?_)(.*)(?:_.*$)/

..will only capture the os_disk part

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜