regular expression to match words with no space
<p>I am trying to do a preg_match to filter unwanted spam queries and I would like to match any word that is listed in the preg_match and filter it if it has no space after it.</p>

<p>So for example if I have the word balloon in the preg_match then I want to filter anything like "balloon1" or "balloond" or "balloonedfbdg" etc and allow anything with a space after balloon like "balloon big", "balloon small" etc.</p>

<p>I have a lot of queries from google that take a single word and add a whole bunch of crap to it that I want to filter out. It is only a few words but it is irrating for me enough to come here and find an answer to fix this.</p>

<p>I already use a preg_match for some of the spam quries using regular expressions but I do not know how to match something that is not spaced and allow something that has a space.</p>

<p>Any help is appreciated, Thanks.</p>
