#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)TOTAL.*?(\d+)%"
Local $sString = "Name Stmts Miss Cover Missing" & @CRLF & _
"---------------------------------------------------------------" & @CRLF & _
"src/global_information.py 8 1 88% 6" & @CRLF & _
"src/settings.py 38 0 100%" & @CRLF & _
"src/storage_backends.py 4 4 0% 1-5" & @CRLF & _
"src/urls.py 8 0 100%" & @CRLF & _
"users/admin.py 1 0 100%" & @CRLF & _
"users/apps.py 3 3 0% 1-5" & @CRLF & _
"users/forms.py 5 0 100%" & @CRLF & _
"users/models.py 1 0 100%" & @CRLF & _
"users/tests/tests_views_urls.py 5 0 100%" & @CRLF & _
"users/urls.py 5 0 100%" & @CRLF & _
"users/views.py 1 1 0% 1" & @CRLF & _
"---------------------------------------------------------------" & @CRLF & _
"TOTAL 79 9 89%" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm