my @parts = $in{'searchtextterms'} =~ /(?|"([^"]*)"|'([^']*)'|(\S+))/g; #### foo'bar