Hi,
How can I use preg_replace to determine if a string contains a word beginning with a pattern, and if it does, remove it?
Basically I want to capture query strings from a search, but throw away search modifiers. For example, the search query string:
site:daniweb.com query
would just become
query
In this case, I want to remove all words in the string that begin with 'site:'.
TIA!