#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?:\B\+ ?49|\b0)(?: *[(-]? *\d(?:[ \d]*\d)?)? *(?:[)-] *)?\d+ *(?:[/)-] *)?\d+ *(?:[/)-] *)?\d+(?: *- *\d+)?"
Local $sString = "+49 39291 55-217" & @CRLF & _
"02102 7007064" & @CRLF & _
"0152 01680970" & @CRLF & _
"+49 39291 55-216" & @CRLF & _
"02102 3802 22" & @CRLF & _
"0800 333004 451-100" & @CRLF & _
"+49 221 9937 26950" & @CRLF & _
"02151-47974510" & @CRLF & _
"+49(0)6105 937 -539" & @CRLF & _
"0211/409 2268" & @CRLF & _
"+49(0)6105 937 -539" & @CRLF & _
"+49211/584-623" & @CRLF & _
"0211 58422 2012" & @CRLF & _
"+49 (9131) 7-35335" & @CRLF & _
"+49 521 9488 2470" & @CRLF & _
"+ 49-40-70 70 84 - 0" & @CRLF & _
"0211 17 95 99 04" & @CRLF & _
"02151-47974327" & @CRLF & _
"+49 203 28900 1121" & @CRLF & _
"0211 9449-2555" & @CRLF & _
"+49 (5 41) 9 98 -2268"
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