#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?x)\A\s*" & @CRLF & _
"(?: #########################################################################" & @CRLF & _
" # Option A: [<Addition to address 1>] <House number> <Street name> #" & @CRLF & _
" # [<Addition to address 2>] #" & @CRLF & _
" #########################################################################" & @CRLF & _
" (?:(?P<A_Addition_to_address_1>.*?),\s*)? # Addition to address 1" & @CRLF & _
"(?:No\.\s*)?" & @CRLF & _
" (?P<A_House_number_1>\pN+[a-zA-Z]?(?:\s*[-\/\pP]\s*\pN+[a-zA-Z]?)*) # House number" & @CRLF & _
"\s*,?\s*" & @CRLF & _
" (?P<A_Street_name_1>(?:[a-zA-Z]\s*|\pN\pL{2,}\s\pL)\S[^,#]*?(?<!\s)) # Street name" & @CRLF & _
"\s*(?:(?:[,\/]|(?=\#))\s*(?!\s*No\.)" & @CRLF & _
" (?P<A_Addition_to_address_2>(?!\s).*?))? # Addition to address 2" & @CRLF & _
"| #########################################################################" & @CRLF & _
" # Option B: [<Addition to address 1>] <Street name> <House number> #" & @CRLF & _
" # [<Addition to address 2>] #" & @CRLF & _
" #########################################################################" & @CRLF & _
" (?:(?P<B_Addition_to_address_1>.*?),\s*(?=.*[,\/]))? # Addition to address 1" & @CRLF & _
" (?!\s*No\.)(?P<B_Street_name>\S\s*\S(?:[^,#](?!\b\pN+\s))*?(?<!\s)) # Street name" & @CRLF & _
"\s*[\/,]?\s*(?:\sNo\.)?\s+" & @CRLF & _
" (?P<B_House_number>\pN+\s*-?[a-zA-Z]?(?:\s*[-\/\pP]?\s*\pN+(?:\s*[\-a-zA-Z])?)*|[IVXLCDM]+(?!.*\b\pN+\b))(?<!\s) # House number" & @CRLF & _
"\s*(?:(?:[,\/]|(?=\#)|\s)\s*(?!\s*No\.)\s*" & @CRLF & _
" (?P<B_Addition_to_address_2>(?!\s).*?))? # Addition to address 2" & @CRLF & _
")" & @CRLF & _
"\s*\Z"
Local $sString = "Corso XXII Marzo 69"
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