title: Need help in Regex pattern- C#
body: <p>I have a string which has a word "provided" and may or may not have the word "deadlock". </p>
  
  <p>I need regex pattern in C# for two scenarios: </p>
  
  <ol>
  <li><p>The string must contain both "provided" and "deadlock".</p></li>
  <li><p>The string must contain "provided" but not "deadlock". </p></li>
  </ol>
  
  <p>So I need two regex pattern for this</p>
  
  <p>I tried  <code>(?.*provided).* ^(?!.*deadlock).*$</code>
  But this didn't help me.</p>