I'm trying to parse a operation summary for files that didn't convert.
I can't seem to get all the errors in my regex string.
In this example, I am only getting 15 of the 22 errors....
https://regex101.com/r/aH4gab/2
Can someone help me get the remaining errors in the text please?
I suspect it is in this part of the code...
\n+.*ERROR:
When removed, I get all 28 files, but I'm trying to get only those files that produced an error.
Thanks for your assistance!
Regex Help
Re: Regex Help
Code: Select all
arr := StrSplit(fileLOg,"`n"), errors := 0, fileFound := false
Loop, % arr.Length() {
l := arr[a_index]
if ( RegExMatch(l, "Processing file") ) {
filnam := RegExReplace(l, ".*Processing file\s*\d+ of \d+,\s*(.*)\s*\.\.\.","$1")
fileFound := true
}
if ( RegExMatch(l, "ERROR:") && filefound ) {
++errors
str .= errors "-" filnam "`t" l "`n"
fileFound := false
}
}
msgbox % str
____________________________________________________________________________
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Windows 10 Pro 64 bit - Autohotkey v1.1.30.01 64-bit Unicode
Re: Regex Help
Thanks! That works too I guess. I was trying to do it all in one query.
Who is online
Users browsing this forum: mikeyww and 143 guests