title: How to specify to only match first occurrence?
body: <p>How can I specify to only match the first occurrence of a regular expression in C# using Regex method?</p>
  
  <p>Here's an example:</p>
  
  <pre><code>string text = @"&lt;link href=""/_layouts/OracleBI/OracleBridge.ashx?RedirectURL=res/sk_oracle10/b_mozilla_4/common.css"" type=""text/css"" rel=""stylesheet""&gt;&lt;/link&gt;&lt;/link&gt;";
  string pattern = @"(&lt;link).+(link&gt;)";
  Regex myRegex = new Regex(pattern, RegexOptions.IgnoreCase);
  
  Match m = myRegex.Match(text);   // m is the first match
  while (m.Success)
  {
      // Do something with m
      Console.Write(m.Value + "\n");
      m = m.NextMatch();              // more matches
  }
  Console.Read();
  </code></pre>
  
  <p>I would like this to only replace up to the first <code>&lt;\link&gt;</code>. And then also do the same for the rest of these matches.</p>