#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\[Full GC.*\)\)\s(?<FullGC1>[^KMG]*)(K|M|G)-\>(?<FullGC2>[^KMG]*)(K|M|G)\((?<FullGC3>[^KMG]*)"
Local $sString = "28820.220: [Full GC (System.gc()) 8832K->8624K(37888K), 0.0261704 secs]" & @CRLF & _
"29372.500: [GC (Allocation Failure) 23984K->8816K(37888K), 0.0013546 secs]" & @CRLF & _
"29932.500: [GC (Allocation Failure) 24176K->8808K(37888K), 0.0017082 secs]" & @CRLF & _
"30492.500: [GC (Allocation Failure) 24168K->8960K(37888K), 0.0017122 secs]" & @CRLF & _
"31047.500: [GC (Allocation Failure) 24320K->8944K(37888K), 0.0020634 secs]" & @CRLF & _
"31602.500: [GC (Allocation Failure) 24304K->8992K(37888K), 0.0017542 secs]" & @CRLF & _
"32157.500: [GC (Allocation Failure) 24352K->8968K(37888K), 0.0018971 secs]" & @CRLF & _
"32420.247: [GC (System.gc()) 16160K->8944K(37888K), 0.0012816 secs]" & @CRLF & _
"32420.248: [Full GC (System.gc()) 8944K->8624K(37888K), 0.0205035 secs]"
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