title: Read a source code from web page and extract some data from it
body: <p>I want to read a source code from web page and extract some data from it.
  I used here in my example a RegEx for extracting the data, but i didn't get 
  any data, perhaps this is due from unicode or the pattern dosn't match ?
  When i test this pattern with RegExBuddy it match, but in vbscript no ?
  Perhaps, i miss something in the code, or i must re-write by another way ?</p>
  
  <p>Here is my try :</p>
  
  <pre><code>Option Explicit
  Dim URL,fso,ws,LogFile,sSrcUrl,oHTTP,bGetAsAsync,Data
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set ws = CreateObject("Wscript.Shell")
  LogFile = Left(Wscript.ScriptFullName,InstrRev(Wscript.ScriptFullName, ".")) &amp; "txt"
  if fso.FileExists(LogFile) Then 
      fso.DeleteFile LogFile
  end If
  
  sSrcUrl = "https://fr.giveawayoftheday.com/"
  Set oHTTP = CreateObject("MSXML2.ServerXMLHTTP.6.0")
  bGetAsAsync = False
  oHTTP.open "GET", sSrcUrl, bGetAsAsync
  oHTTP.send
  If oHTTP.status &lt;&gt; 200 Then
  WScript.Echo "unexpected status = " &amp; oHTTP.status &amp; vbCrLf &amp; oHTTP.statusText
  WScript.Quit
  End If
  Data = oHTTP.responseText
  WriteLog Data,LogFile
  wscript.echo Extract(Data)
  '****************************************************************
  Function Extract(Data)
      Dim oRE,oMatches,Match,Line
      set oRE = New RegExp
      oRE.IgnoreCase = True
      oRE.Global = True
      oRE.MultiLine = True
      oRE.Pattern = "&lt;div class=""giveaway_wrap cf""&gt;(\r.*\n.*){17}&lt;/div&gt;"
      set oMatches = oRE.Execute(Data)
      If not isEmpty(oMatches) then
          For Each Match in oMatches   
              Line = Match.Value
              Extract = Line
          Next
      End if 
  End Function
  '*****************************************************************
  Sub WriteLog(strText,LogFile)
      Dim fs,ts 
      Const ForWriting = 2
      Set fs = CreateObject("Scripting.FileSystemObject")
      Set ts = fs.OpenTextFile(LogFile,ForWriting,True,-1)
      ts.WriteLine strText
      ts.Close
  End Sub
  '*****************************************************************
  </code></pre>
  
  <p>So the result that i expect is :</p>
  
  <pre><code>&lt;div class="giveaway_wrap cf"&gt;
                  &lt;div class="giveaway_img"&gt;
                      &lt;img src="https://giveawayoftheday.com/wp-content/uploads/2017/10/82810932353ab590bf475ea3980f3038.png" alt="Excel Url Validator 1.0 Giveaway" /&gt;
                      &lt;div class="giveaway_label"&gt;
                          &lt;a href="https://fr.giveawayoftheday.com/excel-url-validator-1-0/" class="label_link"&gt;&lt;/a&gt;
                          &lt;div class="old_price"&gt;$40.00&lt;/div&gt;
                          &lt;div class="free"&gt;
                              &lt;span class="big"&gt;GRATUIT&lt;/span&gt; aujourd’hui
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="over"&gt;
                      &lt;div class="giveaway_title"&gt;
                          &lt;a href="https://fr.giveawayoftheday.com/excel-url-validator-1-0/"&gt;Excel Url Validator 1.0&lt;/a&gt;
                          &lt;div class="giveaway_date"&gt;16 octobre 2017&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="giveaway_descr"&gt;Excel Url Validator trouve des liens rompus dans les feuilles de calcul Excel.&lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>