<?php $stringSplit = "+foo a -ba24+Sample3"; preg_match_all("/\+[^-+\s]+/", $stringSplit, $matchesPlus); print_r($matchesPlus[0]); preg_match_all("/-[^-+\s]+/", $stringSplit, $matchesMinus); print_r($matchesMinus[0]);
You have javascript disabled. You will not be able to edit any code.