从字符串的第一个和最后一个修剪它如何[重复]

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[$fieldneedle]);
$objectName == "os_disk";


in this example i need os_disk

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

..will only capture the os_disk part