#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "{\s?([^{}\s]*)\s?}"
Local $sString = "{" & @CRLF & _
" "outputKeys":[" & @CRLF & _
" "hello"" & @CRLF & _
" ]," & @CRLF & _
" "params":{" & @CRLF & _
" "username":"Анастасия"," & @CRLF & _
" "content":"вам пришли новые данные с бота"," & @CRLF & _
" "avatar":"https://twintwoo-prod-media.s3.amazonaws.com/9d491869817b7bdbaaed7ff7d139ff0a"," & @CRLF & _
" "embeds":[" & @CRLF & _
" {" & @CRLF & _
" "fields":[" & @CRLF & _
" {" & @CRLF & _
" "name":"Selected"," & @CRLF & _
" "value":"Форма"," & @CRLF & _
" "inline":true" & @CRLF & _
" }," & @CRLF & _
" {" & @CRLF & _
" "name":"Имя"," & @CRLF & _
" "value":"{name}"," & @CRLF & _
" "inline":true" & @CRLF & _
" }," & @CRLF & _
" {" & @CRLF & _
" "name":"E-mail"," & @CRLF & _
" "value":"{email}"," & @CRLF & _
" "inline":true" & @CRLF & _
" }" & @CRLF & _
" ]" & @CRLF & _
" }" & @CRLF & _
" ]" & @CRLF & _
" }," & @CRLF & _
" "headers":{" & @CRLF & _
" "Accept":"application/json"" & @CRLF & _
" }," & @CRLF & _
" "method":"POST"," & @CRLF & _
" "url":"https://discord.com/api/webhooks/788795281901879296/LPJVPl9UKdexDaVnarPZ3rxHVXXc8kci-7_xeYIfVITWg6Wg-yu9GZ-x7DxsYnpkvUmX"" & @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