<?php $string = 'word1&word2 !word3 word4 &word5'; var_export( preg_split('/ |(?<! )(?=[&!])/', $string) );
You have javascript disabled. You will not be able to edit any code.