Trim string at first punctuation character excluding white space
<p>I am looking for a way to trim a string at the first instance of a punctuation character that isn't a space.</p>

<p>Thanks</p>

<p>[EDIT]
I have tried the following:</p>

<pre><code>var length = input.IndexOf(@"[^\w\s]");

return input.Substring(0, length);
</code></pre>
