#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?:[A-Z] \d|[^\W\d_]{2,}\.?)(?:[- '’][^\W\d_]+\.?)*$"
Local $sString = "########### Absolutly Fine ################" & @CRLF & _
"Mainstreet." & @CRLF & _
"Mainstreet" & @CRLF & _
"Main Street" & @CRLF & _
"Big New mainstreet" & @CRLF & _
"Mainstreet-New" & @CRLF & _
"Mains Str." & @CRLF & _
"St. Alexander Street" & @CRLF & _
"Übermorgen Straße" & @CRLF & _
"John Kennedy Street" & @CRLF & _
"Bahnhofstr." & @CRLF & _
"Leonhard-Eck-Str." & @CRLF & _
"Älterweg" & @CRLF & _
"Graf-Anton-Weg" & @CRLF & _
"Alexanderstraße" & @CRLF & _
"Prof.-Ernst-Nathan-Straße" & @CRLF & _
"Prof.-Albert-Einstein-Weg" & @CRLF & _
"Prof. Ernst-Nathan-Straße" & @CRLF & _
"Prof. Albert-Einstein-Weg" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"########## Not very common but fine!!! ###################" & @CRLF & _
"A 1" & @CRLF & _
"K 7" & @CRLF & _
"H 2" & @CRLF & _
"P 1" & @CRLF & _
"I 7" & @CRLF & _
"E 7" & @CRLF & _
"T 3" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"######## Not okay ################" & @CRLF & _
"A" & @CRLF & _
"B" & @CRLF & _
"Mainstreet #+;:_*´`?=)(/&%$§!" & @CRLF & _
"Mainstreet#+;:_*´`?=)(/&%$§!" & @CRLF & _
"Mainstreet 2" & @CRLF & _
"Mainstreet.." & @CRLF & _
"Mainstreet§" & @CRLF & _
"" & @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