#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^(?:p[0,1][0-9]\.upd|(downloads|cm\.k))\.kaspersky(?(1)-labs)\.com$"
Local $sString = "p00.upd.kaspersky.com" & @CRLF & _
"p01.upd.kaspersky.com" & @CRLF & _
"p02.upd.kaspersky.com" & @CRLF & _
"p03.upd.kaspersky.com" & @CRLF & _
"p04.upd.kaspersky.com" & @CRLF & _
"p05.upd.kaspersky.com" & @CRLF & _
"p06.upd.kaspersky.com" & @CRLF & _
"p07.upd.kaspersky.com" & @CRLF & _
"p08.upd.kaspersky.com" & @CRLF & _
"p09.upd.kaspersky.com" & @CRLF & _
"p10.upd.kaspersky.com" & @CRLF & _
"p11.upd.kaspersky.com" & @CRLF & _
"p12.upd.kaspersky.com" & @CRLF & _
"p13.upd.kaspersky.com" & @CRLF & _
"p14.upd.kaspersky.com" & @CRLF & _
"p15.upd.kaspersky.com" & @CRLF & _
"p16.upd.kaspersky.com" & @CRLF & _
"p17.upd.kaspersky.com" & @CRLF & _
"p18.upd.kaspersky.com" & @CRLF & _
"p19.upd.kaspersky.com" & @CRLF & _
"downloads.kaspersky-labs.com" & @CRLF & _
"cm.k.kaspersky-labs.com"
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