On 29/10/06, Alan Milnes <css@xxxxxxxxxxx> wrote:
Dotan Cohen wrote: > $searchQuery=str_replace( "^".$noiseArray."$", " ", $searchQuery); Can you explain what you are trying to do with the ^ and $? What is a typical value of the original $searchQuery? Alan
The purpose of the ^ and the $ is to define the beginning and the end of a word: http://il2.php.net/regex I also tried str_replace( $noiseArray, " ", $searchQuery) but that was replacing the insides of words as well. And with the addition of the individual letters, that emptied the entire $searchQuery string! A typical value of $searchQuery could be "What is php?" or "What is open source". See this site for details: http://what-is-what.com Dotan Cohen http://technology-sleuth.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php