#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(\w+):\s?(\w+);"
Local $sString = " AllowMagazine: boolean;" & @CRLF & _
" Badge: string;" & @CRLF & _
" BirthDay: number;" & @CRLF & _
" Blocked: boolean;" & @CRLF & _
" BusNr: string;" & @CRLF & _
" CardQty: number;" & @CRLF & _
" CityID: number;" & @CRLF & _
" CityName: string;" & @CRLF & _
" CityZip: string;" & @CRLF & _
" CountryISOCode: string;" & @CRLF & _
" CustomerID: number;" & @CRLF & _
" DirectReduction: boolean;" & @CRLF & _
" Email: string;" & @CRLF & _
" FirstName: string;" & @CRLF & _
" Gender: string;" & @CRLF & _
" IsActive: boolean;" & @CRLF & _
" LanguageISO: string;" & @CRLF & _
" LastName: string;" & @CRLF & _
" Mailing: boolean;" & @CRLF & _
" Mobile: string;" & @CRLF & _
" Phone: string;" & @CRLF & _
" Pincode: string;" & @CRLF & _
" Reduction: number;" & @CRLF & _
" ReductionAllowed: boolean;" & @CRLF & _
" Street: string;" & @CRLF & _
" StreetNr: string;" & @CRLF & _
""
Local $sSubst = "@property {$2} $1"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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