title: Regex - Match line but with exception (! hyphen)
body: <p>I'm trying to filter the event log based on regex but I'm unable to figure it out yet.</p>
  <p>Scenario 1): I want to match the full line starting with <code>Account Name</code> but I don't want to match the line if it has <code>- (hyphen)</code> only that. But it should match <code>-test-user</code>.</p>
  <p>I tried <code>(Account Name:.*(!-).*)</code> but it isn't working.</p>
  <p>Content:</p>
  <pre><code>Account Name:       -
  Account Name:       testing
  </code></pre>
  <p>Scenario 2): I want to try matching the second <code>Account name</code> line with or without hyphen in the <code>Account For Which Logon Failed</code> section and not from <code>Subject</code> section.</p>
  <p>I tried <code>(Account Name:.*){2}</code> but it isn't working.</p>
  <p>Content:</p>
  <pre><code>Account Name:       -
  Account Name:       testing
  </code></pre>
  <p>Scenario 3): Combine both Scenario, Match the second <code>Account name</code> line but only it has no <code>- (hyphen)</code>. If the second <code>Account name</code> has only hyphen then don't match anything but it should match <code>-test-user</code>.</p>
  <p>I'm trying to learn here that's why I want to figure out all three scenario. Eventually I'll use only the last one.</p>
  <p>Here is the full content:</p>
  <pre><code>Subject:
      Security ID:        NULL SID
      Account Name:       -
      Account Domain:     -
      Logon ID:       0x0
  
  Logon Type:         3
  
  Account For Which Logon Failed:
      Security ID:        NULL SID
      Account Name:       testing
  </code></pre>