#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^(.+)\s+-\s+(.+?) +[fF](t|eat(uring)?)?\.?([^([\])\n]+)(.+)?$"
Local $sString = "Carbin & Sirmark - Sorry featuring Sevener" & @CRLF & _
"Kristjan Cash Cash - Take Me Home Feat. Bebe Rexha (Revoke Remix)" & @CRLF & _
"Dj E-nergy C - 21 - My Super-hero track! feat Dj Ass-hole" & @CRLF & _
"Flight Facilities - Heart Attack Feat. Owl Eyes (Snakehips Remix)" & @CRLF & _
"Flight Facilities - Heart Attack Feat. Owl Eyes [Snake--hips Remix]" & @CRLF & _
"Fedde Le Grand - Cinematic" & @CRLF & _
"Fedde Le Grand Feat. Denny White - Cinematic" & @CRLF & _
"Artist - Name - Track Name feat someone" & @CRLF & _
"Artist Name - Track-Name feat someone" & @CRLF & _
"Dj E- nergy C -21 - My Super-hero track! feat Dj Ass-hole" & @CRLF & _
"Dj E-nergy C-21 - My Super-hero track!"
Local $sSubst = "$1 Feat.$5 - $2$6"
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