title: Visual Basic .net Regex match does not work - despite working on a testing tool?
body: <p>I've a stupidly simple question for someone - but I can't answer it myself. I've a regex pattern that works in two different online testers, one of which is .net based.</p>
  
  <p>Yet here it finds no matches. Can anyone help? The purpose is to filter a lovely page of F# cheats so that it is printable :).</p>
  
  <p>I'm mentoring my youngest brother, he's on week 4 of learning to code - this is his function and I confess it's stumped me! Any help I'd be very grateful for!!</p>
  
  <pre><code>  Public Function FindCode(input As String)
      Dim pattern As String = "(?m)(&lt;pre&gt;)(.+)(&lt;\/pre&gt;)\B"
      Dim output As New Dictionary(Of Integer, String)
      Dim count As Integer
  
      For Each match As Match In Regex.Matches(input, pattern)
          output.Add(count, match.Value)
          count += 1
      Next
  Return output.count
  End Function
  </code></pre>
  
  <p>I don't get execptions, I get no matches.</p>
  
  <p>An example would be </p>
  
  <pre><code>Some random markup &lt;pre&gt; and this stuff in the middle is what I'm after &lt;/pre&gt; and there &lt;/pre&gt; lots of these in one file &lt;/pre&gt; which when I use Regexhero &lt;pre&gt; finds all the tags  &lt;/pre&gt; 
  </code></pre>
  
  <p>This way we would use the groups perhaps to list all the items between the pre /pre tags.</p>
  
  <p>Thanks for such quick responses! </p>