I have absolutely no clue about regular expressions (sorry to say) and I need to return just the 22.214.171.124 bit. How do I tweak the code below to do what I need?
Dim psi As New ProcessStartInfo
.UseShellExecute = False
.RedirectStandardInput = True
.RedirectStandardOutput = True
.FileName = "nslookup"
.Arguments = "aspen-plc.co.uk"
Dim ns As Process = Process.Start(psi)
Dim sout As System.IO.StreamReader = ns.StandardOutput
Dim re As New System.Text.RegularExpressions.Regex(REGEX_REQUIRED_HERE)
Dim sIPAddress As String
Dim response As String = ""
While (sout.Peek() > -1)
response = sout.ReadLine()
Dim amatch As System.Text.RegularExpressions.Match = re.Match(response)
If (amatch.Success) Then
sIPAddress = amatch.Groups("Address").Value
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…