title: C# - Negative Lookahead doesn't seem to work
body: <p>Working in C# .Net 4.5</p>
  
  <p>I need an expression that will look through a string and fail the match if the string has two or more capital characters anywhere in the string.</p>
  
  <p>What I think should be the correct pattern is this:</p>
  
  <pre><code>(?![A-Z]{2,})\w
  </code></pre>
  
  <p>Note: tried both <code>?!</code> and <code>?&lt;!</code> </p>
  
  <p>I got the opposite to work, search a string and return true if there are 2 or more cap's in a row and that pattern is as follows:</p>
  
  <pre><code>(?=[A-Z]{2,})\w
  </code></pre>
  
  <p>But I have to have this working off of the negative lookahead pattern.</p>
  
  <p>From all the posts I've read this should be the correct way to do it, but it's not working for me.</p>
  
  <p>I've read through questions such as :</p>
  
  <p><a href="https://stackoverflow.com/questions/19407474/c-sharp-regexp-negative-lookahead">C# regexp negative lookahead</a>
  or
  <a href="https://stackoverflow.com/questions/5081504/regex-negative-lookahead-in-c-sharp">Regex negative lookahead in c#</a></p>
  
  <p>etc...</p>
  
  <p>I don't want to list them all. But they all say more or less the same thing, just use the negative lookahead (?!)</p>
  
  <p>Can anyone see what I'm doing wrong for this not to work?</p>
  
  <p>Edit: </p>
  
  <p>added some examples:</p>
  
  <ol>
  <li>Hello   - Should pass</li>
  <li>HEllo   - Should fail</li>
  <li>heLLo   - Should fail</li>
  <li>HELLO   - should fail</li>
  </ol>
  
  <p>Advanced version:</p>
  
  <ol>
  <li>Hello World    - should pass</li>
  <li>Hello WOrld    - should fail</li>
  <li>hello wORld    - should fail</li>
  <li>hello WORLD    - should fail</li>
  </ol>