开发者

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

开发者 https://www.devze.com 2023-02-04 08:07 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: unset last item of array
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

精彩评论

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