title: VBA regex - getting matches from multiple lines
body: <p>Provided that I have the following text:</p>
  
  <pre><code>55,8%(1) – 3426 bytes used from 6kB
  58,1%(2) – 3572 bytes used from 6kB
  </code></pre>
  
  <p>I would like to use the following pattern:</p>
  
  <pre><code>^(\d\d,\d)(?:%\(\d\) . )(\d{3,4})(?: )(bytes)(?: used from )(\d{1,3})(?:kB)$
  </code></pre>
  
  <p>It returns matches only from the second line. But <strong>I want it to get matches from both lines</strong>:
  <a href="https://i.stack.imgur.com/ZJlLk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZJlLk.png" alt="debug"></a></p>
  
  <p>Here is the code which I use:</p>
  
  <pre><code>Dim ramtext As String
  ramtext = getTableCellText("1.7", 3, 2)
  
  Dim regex As New RegExp
  With regex
      .Pattern = "^(\d\d,\d)(?:%\(\d\) . )(\d{3,4})(?: )(bytes)(?: used from )(\d{1,3})(?:kB)$"
      .Global = 1
      .MultiLine = 1
  End With
  
  
  Dim matches As MatchCollection
  Set matches = regex.Execute(ramtext)
  </code></pre>