 <p>Assuming that's VB.Net, you need to escape the <code>)</code>:</p> <pre><code>If Regex.IsMatch(Output, "\b" &amp; "Serial\)" &amp; "\b") Then 'do something End If </code></pre> <p>In .Net regular expressions, parentheses are the grouping characters.</p> <hr> <p>If, as you say, the word 'Serial)' is generated dynamically, you will have to <a href="http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.escape.aspx" rel="nofollow noreferrer">escape</a> it before passing it to the RE engine:</p> <pre><code>If Regex.IsMatch(Output, "\b" &amp; Regex.Escape("Serial)") &amp; "\b") Then 'do something End If </code></pre> <hr> <p>As one other answerer has posted, this won't match <code>"Serial) xyz"</code> (for example) since there's no <code>\b</code> between the <code>)</code> and space (<code>\b</code> only exists <em>between</em> <code>\w</code> and <code>\W</code> characters and both <code>)</code> and a space are <code>\W</code>).</p> <p>You may have to resort to an ugly hack like:</p> <pre><code>If Regex.IsMatch(Output, "\s" &amp; Regex.Escape("Serial)") &amp; "\s") _ Or Regex.IsMatch(Output, "\s" &amp; Regex.Escape("Serial)") &amp; "$") _ Or Regex.IsMatch(Output, "^" &amp; Regex.Escape("Serial)") &amp; "\s") _ Or Regex.IsMatch(Output, "^" &amp; Regex.Escape("Serial)") &amp; "$") _ Then 'do something End If </code></pre> <p>I thought that maybe you could match a character class consisting of (<code>^</code> or <code>$</code>) and <code>\s</code> along the lines of:</p> <pre><code>If Regex.IsMatch(Output, "[\s^]" &amp; Regex.Escape("Serial)") &amp; "[\s$]") Then 'do something End If </code></pre> <p>but this doesn't appear to work based on the regex tester <a href="http://regexlib.com/RETester.aspx" rel="nofollow noreferrer">here</a> so you may have to go for the ugly hack version or you could combine them into a single regex as in:</p> <pre><code>var input = "Serial)" var escaped = Regex.Escape (input) var regex = "\s" &amp; escaped &amp; "\s|^" &amp; escaped &amp; "$|\s" &amp; escaped &amp; "$|^" &amp; escaped &amp; "\s" If Regex.IsMatch(Output, regex) Then 'do something End If </code></pre>