<?php $s = '"foo bar"ANDbar"foo"AND"foofoo" lorem "impsum"'; if (preg_match_all('~(?|"([^\\\\"]*(?:\\\\.[^"\\\\]*)*)"|([^\s"]+))~s', $s, $matches)) { print_r($matches[1]); }
You have javascript disabled. You will not be able to edit any code.