#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?P<key>\w+) = (?P<value>[^,\n\r]+)"
Local $sString = "Data:" & @CRLF & _
"Version: 3 (0x2)" & @CRLF & _
" Serial Number : -283916479 (-0x10ec38bf)" & @CRLF & _
" Signature Algorithm : sha256WithRSAEncryption" & @CRLF & _
" Issuer : C = US, ST = CA, L = San Jose, O = Ubiquiti Networks Inc., OU = Technical Support, CN = UBNT - 80 : 2A : A8 : EE : B0 : A3 / emailAddress = support@ubnt.com" & @CRLF & _
" Validity" & @CRLF & _
" Not Before : Mar 29 15 : 17 : 00 2017 GMT" & @CRLF & _
" Not After : Mar 29 15 : 17 : 00 2022 GMT" & @CRLF & _
" Subject : C = US, ST = CA, L = San Jose, O = Ubiquiti Networks Inc., OU = Technical Support, CN = UBNT - 80 : 2A : A8 : EE : B0 : A3 / emailAddress = support@ubnt.com" & @CRLF & _
" Subject Public Key Info :" & @CRLF & _
" Public Key Algorithm : rsaEncryption" & @CRLF & _
" Public - Key : (2048 bit)" & @CRLF & _
" Modulus :" & @CRLF & _
" Exponent : 65537 (0x10001)" & @CRLF & _
" Signature Algorithm : sha256WithRSAEncryption" & @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