#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(i?)Liferay-Portal:.*?(\d+\.?.*?)\s"
Local $sString = "HTTP/1.1 200 OK" & @CRLF & _
"Expires: Thu, 01 Jan 1970 00:00:00 GMT" & @CRLF & _
"Cache-Control: private, no-cache, no-store, must-revalidate" & @CRLF & _
"Pragma: no-cache" & @CRLF & _
"X-Frame-Options: SAMEORIGIN" & @CRLF & _
"Date: Mon, 24 Oct 2022 16:46:09 GMT" & @CRLF & _
"Connection: keep-alive" & @CRLF & _
"X-Content-Type-Options: nosniff" & @CRLF & _
"Transfer-Encoding: chunked" & @CRLF & _
"Content-Type: text/html;charset=UTF-8" & @CRLF & _
"Liferay-Portal: Liferay Community Edition Portal 7.4.3.15 CE GA15 (Cavanaugh / Build 7403 / March 11, 2022)" & @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