#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = ".*zz\s*:\s*(.*)[\n\r]"
Local $sString = "{" & @CRLF & _
" xx : " & @CRLF & _
" yy :" & @CRLF & _
" zz : sample 123123" & @CRLF & _
"}" & @CRLF & _
"HTTP/1.1 202... blah blah blah" & @CRLF & _
"Content-Length: 35" & @CRLF & _
"X-Frame-Options: deny" & @CRLF & _
"X-XSS-Protection: 1; mode=block" & @CRLF & _
"X-Content-Type-Options: nosniff" & @CRLF & _
"Connection: close"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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