#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?miu)^ver(ä|a)ntwortlich(er)?\.?\s+g(em((ä|a)(ß|s{1,2})?)?)?\.?\s+a(rt(ikel)?)?\.?"
Local $sString = "Verantwortlicher gemäß Art" & @CRLF & _
"Verantwortlicher gemäß. Art." & @CRLF & _
"Verantwortlicher gemäss Art" & @CRLF & _
"Verantwortlicher gemäs art" & @CRLF & _
"Verantwortlicher gemaß Art" & @CRLF & _
"Verantwortlicher gemä Art" & @CRLF & _
"Verantwortlicher. gem A." & @CRLF & _
"Verantwortlicher gem Art" & @CRLF & _
"Verantwortlicher g. A." & @CRLF & _
"Verantwortlicher g Artikel." & @CRLF & _
"Verantwortlicher g Art" & @CRLF & _
"Verantwortlicher gemass Artikel" & @CRLF & _
"Verantwortlicher g Artikel" & @CRLF & _
"Verantwortlicher gemass Artikel" & @CRLF & _
"Verantwortlich. gemass Artikel" & @CRLF & _
"Verantwortlich gemass Artikel" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"^" & @CRLF & _
"verantwortlicher" & @CRLF & _
"\s+" & @CRLF & _
"g(em((ä|a)(ß|s+)?)?)?\.?" & @CRLF & _
"\s+" & @CRLF & _
"a(rt(ikel)?)?\.?" & @CRLF & _
"" & @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