#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)@if\((?P<condition>.*)\)\n*\s*(?P<content>(?s:[\=\"\;\,\$\{\}\_\(\)\.\!\'\-\:\s\/\<\>\w\näöüÄÖÜèéà@]*))@endif"
Local $sString = "@if('0' == '0')" & @CRLF & _
" <div id="alert" class="alert alert-danger" style="display: inline-block">fgh</div>" & @CRLF & _
"@endif" & @CRLF & _
"<form method="post">" & @CRLF & _
"<button id="startLogik" class="button" type="submit" name="start">fgh</button>" & @CRLF & _
"</form>" & @CRLF & _
"@if('0' == '1')" & @CRLF & _
" <script type="text/javascript">" & @CRLF & _
" Logik_SrvBsy = "bsy";" & @CRLF & _
" GetClientName();" & @CRLF & _
" Logik_Init("", "", "web","test","Start");" & @CRLF & _
" Logik_SPar_fx("WEB_LOGIN.EMAIL", "mail@mail");" & @CRLF & _
" Logik_SPar_fx("WEB_LOGIN.WEBID", "cvb");" & @CRLF & _
" Logik_SPar_fx("WEB_LOGIN.LANG", "cvb");" & @CRLF & _
" Logik_Exec_fx("Start");" & @CRLF & _
"</script>" & @CRLF & _
"@endif"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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