title: RegExp numbers between single quotes
body: <p>I have a string like this <code>"f_details('277095');"&gt;</code>.   I just need to get the <code>277095</code> part.  I've been trying variations of <code>strPattern = "'[0-9]'+"</code>, but this is either finding nothing or finding the wrong things.  </p>
  
  <p>I don't understand regular expressions despite having a cheat sheet right in front of me.  Spent an hour trying different things already.  What would this regexp look like?</p>
  
  <p>Here is my code that I use to scrape this site and grab data:</p>
  
  <pre><code>Set objWshShell = Wscript.CreateObject("Wscript.Shell")
  Set IE = CreateObject("internetexplorer.application")
  Set fso = CreateObject("Scripting.FileSystemObject")
  
  on error resume next
  For i=1 To 77 '77 Counties
  
  If i=77 Then Exit For
  
  IE.Visible = True
  IE.Navigate "https://lic.ok.gov/PublicPortal/OREC/FindAssociateEntity.jsp"
  Do Until IE.ReadyState = 4: WScript.sleep 15: Loop
  
  Do Until IE.Document.ReadyState = "complete": WScript.sleep 10: Loop
  IE.Document.getElementsByTagName("select")("AddrCountyCode").Value = i
  
  Do Until IE.Document.ReadyState = "complete": WScript.sleep 10: Loop
  For Each btn In IE.Document.getElementsByTagName("input")
  If btn.name = "btnSearch" Then btn.Click()
  NEXT
  
  strPattern = "'(\d+)'"
  
  strTestString = ie.document.body.innerhtml
  
  arrAllMatches = fGetMatches(strPattern, strTestString)
  
  If UBound(arrAllMatches) &lt;&gt; 0 Then 
  
  filename = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName) &amp; "\License.txt"
  
  set fso = createobject("scripting.filesystemobject")
  set ts = fso.opentextfile(filename,8,true) 
  ts.write Join(arrAllMatches, vbCrlf)
  ts.close 
  
  Else
  
  WScript.Echo "-- None Found --"
  
  End if
  
  next
  Wscript.echo "DONE!"
  
  '=====================================================================
  Function fGetMatches(sPattern, sStr)
  Dim regEx, retVal, sMatch, colMatches, temp
  Set regEx = New RegExp     ' Create a regular expression.
  regEx.Pattern = sPattern   ' Set pattern.
  regEx.IgnoreCase = True   ' Set case insensitivity.
  regEx.Global = True        ' Set global applicability.
  
  Set colMatches = regEx.Execute(sStr)   ' Execute search.
  
  If colMatches.Count = 0 Then
      temp = Array("")
  Else
      '# Convert Collection to Array
      For Each sMatch In colMatches
          temp = temp &amp; sMatch &amp; "¶"
      Next
      temp = Left(temp, Len(temp) - 1)
      temp = Split(temp, "¶")
  End If
  
  fGetMatches = temp
  End Function
  </code></pre>