#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m):(?P<key>[\w-]+): (?P<value>.+)"
Local $sString = "" & @CRLF & _
":env-wirecard:" & @CRLF & _
"" & @CRLF & _
":domain: wirecard.com" & @CRLF & _
":documentation-url: doc.{domain}" & @CRLF & _
":payment-gateway-abbr: WPG" & @CRLF & _
":payment-page-abbr: WPP" & @CRLF & _
":payment-page-anchor: WPP" & @CRLF & _
":payment-page-abbr-lower-case: wpp" & @CRLF & _
":payment-provider-name-lower-case: wirecard" & @CRLF & _
":payment-provider-name: Wirecard" & @CRLF & _
":mermaid-config: config/mermaid-default-theme.json" & @CRLF & _
":payment-redirect-url-hostname: www.wirecard.com" & @CRLF & _
":api-id: wpp" & @CRLF & _
":checkout-page-html-hostname: www.wirecard.com" & @CRLF & _
":payment-page-function-short: WPP" & @CRLF & _
":payment-page-function: WirecardPaymentPage" & @CRLF & _
":pay-button-name: wirecard" & @CRLF & _
":three-d-s-pw: wirecard" & @CRLF & _
"" & @CRLF & _
":3dsecure-test-instance-hostname: 3dsecure-test.{domain}" & @CRLF & _
":data-warehouse: {payment-provider-name} Data Warehouse" & @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