title: VB.Net Regex Licence Key
body: <p>So i want to parse licence keys from some text (<strong>mytext</strong>).</p>
  
  <p>All licence keys are in form of: <code>XXXXX-XXXXX-XXXXX-XXXXX-XXXXX</code> (X as random character)</p>
  
  <p>I tried:</p>
  
  <pre><code>Dim findtext1 As String = "(?&lt;=\w{5}-\w{5}-\w{5}-\w{5}-\w{5})"
  Dim myregex1 As String = mytext
  Dim doregex1 As MatchCollection = Regex.Matches(myregex1, findtext1)
  Dim matches1 As String = ""
  For Each match1 As Match In doregex1
      matches1 = matches1 + match1.ToString + Environment.NewLine
  Next
  MsgBox(matches1)
  </code></pre>
  
  <p>But no results have been found.</p>