#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(mm[gvis]([0-9]{1,3})?|((media(\.|-)[a-zA-Z]{1,4}[0-9]{1,2}-[0-9]{1,2}\.)(cdn|fna)))\.whatsapp\.net$"
Local $sString = "mms241.whatsapp.net" & @CRLF & _
"mmi362.whatsapp.net" & @CRLF & _
"mmv785.whatsapp.net" & @CRLF & _
"mmg362.whatsapp.net" & @CRLF & _
"mmg.whatsapp.net" & @CRLF & _
"media.fada1-1.fna.whatsapp.net" & @CRLF & _
"media.faq12-1.fna.whatsapp.net" & @CRLF & _
"media.saq1-13.fna.whatsapp.net" & @CRLF & _
"media.sif1-2.cdn.whatsapp.net" & @CRLF & _
"media.scf21-2.cdn.whatsapp.net" & @CRLF & _
"media.sqf1-25.cdn.whatsapp.net" & @CRLF & _
"media-scf21-2.cdn.whatsapp.net" & @CRLF & _
"media-sqf1-25.cdn.whatsapp.net" & @CRLF & _
"media-fawq1-13.fna.whatsapp.net" & @CRLF & _
"media.fyei6-5.fna.whatsapp.net"
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