That's the right idea, but not quite what they are looking for. Sounds like they want to remove everything to the right and including the first + sign.
There are several ways. I'd use one of the ones below given the simple criteria:
PHP Code:
$aParts = explode('+', $str);
print $aParts[0];
Would be the easiest.
PHP Code:
$sFirst = strtok($str, '+');
print $sFirst;
Is another easy one and probably slightly better on memory.
There are several ways to accomplish this; it is one of the pros of being a string based language. I would not recommend using pcre when you are simply striping based off of another character.