sigh You just couldn't pick an easy one, could you?
I wrote a script that will do this for you (and you'll come back and say you don't need it anymore, right?) but it's not pretty or efficient. Hey, you can't argue with results, right?
$input = "run run stop \"sit down\" \"stand up\" run sit stand";
while($i < strlen($input)){
$strleft_st=substr($input,$i+1);
if(($input[$i]=="\""&&$i!=$ps_in)||($i==0&&$input[0]=="\"")){
$val_ar[]=substr($input,$i,2+strpos($strleft_st,"\""));
$ps_in=$i+1+strpos(substr($input,$i+1),"\"");
}
elseif(($input[$i]==" "&&$ps_in<$i &&!strstr(substr($input,$i,1+strpos($strleft_st," ")),"\""))||($i == 0&&$input[0]!= "\"")){
if(strpos($strleft_st," "))$val_ar[]=substr($input,$i,1+strpos($strleft_st," "));
else $val_ar[]=substr($input,$i);
}
$i++;
}
One reason it is so messy is that I had to add extra checks for the first and last characters. It's no one line solution but I hope it helps.