VBScript solution, since you tagged your question vbscript:
Set fso = CreateObject("Scripting.FileSystemObject")
txt = fso.OpenTextFile("C:\path\to\your.log").ReadAll
Set re = New RegExp
re.Pattern = """([^""]*)"""
re.Global = True
For Each m In re.Execute(txt)
WScript.Echo m.SubMatches(0)
Next
Demonstration:
>>> s = "<name=""ExecResponse"" value=""XXXXXXXXXXXXXXXXXXXXXXX" & vbNewLine & _
"XXXXXXXXXXXXXXXXXXXXXXX" & vbNewLine & _
"XXXXXXXXXXXXXXXXXXXXXXX" & vbNewLine & _
"XXXXXXXXXXXXXXXXXXXXXXX" & vbNewLine & _
"XXXXXXXXXXXXX=="" />"
>>> WScript.Echo s
<name="ExecResponse" value="XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX==" />
>>> Set re = New RegExp
>>> re.Pattern = """([^""]*)"""
>>> re.Global = True
>>> For Each m In re.Execute(s) : WScript.Echo m.SubMatches(0) : Next
ExecResponse
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXX==
The actual regular expression is "([^"]*)"
, but the double quotes must be doubled to escape them inside the string.
If you want a more specific match (e.g. just the value of the value
attribute), you need to make the regular expression more specific, e.g. like this: value="([^"]*)"
.