#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)token=([^;]+)"
Local $sString = "Fri, 22 Feb 2019 22:39:19 GMT'," & @CRLF & _
" 'application/json'," & @CRLF & _
" '76'," & @CRLF & _
" 'close'," & @CRLF & _
" [ 'token=fCMNSX6y85W.7jOzwvpp8GQ; Secure; HttpOnly; expires=Wed, 21 Oct 2099 04:24:00 GMT' ]," & @CRLF & _
" 'content-type,cache-control,pragma,x-request-id'," & @CRLF & _
" 'true' ] '"
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