#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:(f|F)((a|A)(X|x))?(?:\s?(\-|\:)?\s?))(?:\s?[0-9\+\.\(\)\/\\\-]\/?\\?\s?){7,30}(*SKIP)(*FAIL)|(?:\s?[0-9\+\.\(\)\/\\\-]\/?\\?\s?){7,30}"
Local $sString = "PO BOX number 1234, CA - 3265 TEL: +1-200-200-2000 FAX: +1-200-200-2001 " & @CRLF & _
"PO BOX number 1234, CA - 3265 Service: +1-200-200-2002 \ +1-200-200-2022 F : +1-200-200-2003 " & @CRLF & _
"PO BOX number 1234, CA - 3265 care: +1-200-200-2004 f : +1-200-200-2005 " & @CRLF & _
"PO BOX number 1234, CA - 3265 fire: +1-200-200-2006 fax : +1-200-200-2007 " & @CRLF & _
"PO BOX number 1234, CA - 3265 help: +1-200-200-2008 fax - +1-200-200-2009 " & @CRLF & _
"PO BOX number 1234, CA - 3265 fax : (+123)-4567890 \ (+123)-4567891" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"(?:(f|F)((a|A)(X|x))?"
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