I'm trying to create a google-like query parser.
I want:
$string = 'foo bar "you betcha"';
$word = split('<<some regexp>>', $string);
while (list($index, $s) = each($word)){
echo "$index => $s<br>";
}
to print the following:
0 => foo
1 => bar
2 => you betcha
but I can't seem to figure out the right regular expression. I tried this one, but it didn't work at all (it just returned the entire string unaltered):
([ ].[ ]$)|(["].["]$)
What am I doing wrong?
Thanks!!!
Jason