How to avoid warning of Unreachable code
<p>I have the below</p>

<pre><code>string currency = string.Empty;
Regex r = new Regex(@"~(\w*[a-zA-Z0-9$£~%]+)", RegexOptions.IgnoreCase | RegexOptions.Compiled);
for (Match m = r.Match(expression); m.Success; m = m.NextMatch())
{
      currency = (m.Groups[1].Value);
      break;
}
return currency;
</code></pre>

<p>The intension is that, after the first match in the loop it should break.</p>

<p>The warning messge(Unreachable code) is happening  <strong>m = m.NextMatch()</strong> of the loop.</p>

<p>How to overcome this?</p>

<p>Thanks</p>
