#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?mi)^(.*?)[ ._-]*(?:s\w*\s*\d+)?(?:e\d\d(?:-\d\d)?)?[\s.]*\w*?\.torrent(?:[\s\S]*\1.*$)*$"
Local $sString = "Veep - Season 1 BDMux.torrent" & @CRLF & _
"Vegas S01e01-21.torrent" & @CRLF & _
"Velvet S01e13.torrent" & @CRLF & _
"Velvet.e10.torrent" & @CRLF & _
"Velvet_e01.torrent" & @CRLF & _
"Veronica Mars s01.torrent" & @CRLF & _
"Vicious S01e01-06.torrent" & @CRLF & _
"Victor Ros S01e01-06.torrent" & @CRLF & _
"Video.Game.High.School.S01e01-09.XviD.torrent" & @CRLF & _
"Vikings - Season 1 EXT.torrent" & @CRLF & _
"Vikings_S04e04.avi.torrent" & @CRLF & _
""
Local $sSubst = "\1"
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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