#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)^" & @CRLF & _
" (?P<show>[a-zA-Z1-9\.\-]+[^\.])" & @CRLF & _
" \.[Ss]?(?P<season>\d{1,2})[EeXx](?P<episode>\d{1,2})" & @CRLF & _
" (\.(?P<title>[a-zA-Z1-9\.]+[^\.]))?" & @CRLF & _
" \.(?P<resolution>\d{3,4}p)" & @CRLF & _
" \.(?P<quality>[a-zA-Z\-]{1,6})" & @CRLF & _
" \.(?P<codec>[a-zA-Z0-9\.]+\d)" & @CRLF & _
" ([\.\-](?P<team>.+))?" & @CRLF & _
"$"
Local $sString = "Person.of.Interest.S05E13.720p.HDTV.X264-DIMENSION" & @CRLF & _
"The.Big.Bang.Theory.S09E21.720p.HDTV.X264-DIMENSION[ettv]" & @CRLF & _
"Homeland.S05E11.Our.Man.in.Damascus.720p.WEB-DL.DD5.1.H264-NTb[rarbg]" & @CRLF & _
"limitless.s01e01.pilot.720p.webrip.hevc.x265.rmteam" & @CRLF & _
"vikings.s04e01.a.good.treason.720p.web.dl.hevc.x265.rmteam" & @CRLF & _
"Brooklyn.Nine-Nine.S03E23.720p.WEBRip.x264" & @CRLF & _
""
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