#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^(.*?) \d{1,2}\/ ?(\d{1,2})\/ ?\d{4}(?: (?:ONE DAY|(?:\d{1,2}\/ ?(\d{1,2})\/ ?\d{4})))? (.*)$"
Local $sString = "Forest Moon 12/2/2018 12/3/2018 Assault Battles" & @CRLF & _
"Home One 12/5/2018 ONE DAY Fleet Mastery" & @CRLF & _
"The Artist of War 12/ 6/ 2018 12/ 12/ 2018 Legendary" & @CRLF & _
"Chimera 12/7/2018 12/ 13/ 2018 Legendary" & @CRLF & _
"Endor Escalation 12/8/2018 ONE DAY Heroic" & @CRLF & _
"" & @CRLF & _
"The Artist of War 12/8/2018 12/9/2018 Mythic" & @CRLF & _
"" & @CRLF & _
"Ground War 12/ 10/2018 12/ 11/2018 Assault Battles" & @CRLF & _
"Ewoks and Empire 12/13/2018 ONE DAY Omega Battles" & @CRLF & _
"Executrix 12/ 15/2018 ONE DAY Fleet Mastery" & @CRLF & _
"Rebel Round-Up 12/ 16/2018 12/ 17/ 2018 Assault Battles" & @CRLF & _
"Secrets and Shadows 12/ 19/ 2018 12/ 20/2018 Assault Battles" & @CRLF & _
"Endurance 12/ 21/2018 ONE DAY Fleet Mastery" & @CRLF & _
"Military Might 12/ 22/2018 12/ 23/2018 Assault Battles" & @CRLF & _
"Ghosts of Dathomir 12/22/2018 ONE DAY Special Event" & @CRLF & _
"Rebels and Geonosians 12/24/2018 ONE DAY Omega Battles" & @CRLF & _
"Ground War 12/24/2018 12/25/ 2018 Assault Battles" & @CRLF & _
"Grandmaster's Training 12/24/2018 12/25/2018 Mythic" & @CRLF & _
"" & @CRLF & _
"Ewoks and Empire 12/25/2018 ONE DAY Omega Battles" & @CRLF & _
"Military Might 12/ 25/2018 12/ 26/2018 Assault Battles" & @CRLF & _
"Executrix 12/ 25/ 2018 ONE DAY Fleet Mastery" & @CRLF & _
"The Artist of War 12/ 25/ 2018 12/ 26/ 2018 Mythic" & @CRLF & _
"" & @CRLF & _
"One Famous Wookie 12/25/2018 1/8/2019 Legendary" & @CRLF & _
"" & @CRLF & _
"Jedi and Tusken 12/26/2018 ONE DAY Omega Battles" & @CRLF & _
"Forest Moon 12/26/2018 12/27/2018 Assault Battles" & @CRLF & _
"Home One 12/26/2018 ONE DAY Fleet Mastery" & @CRLF & _
"Sith and Droids 12/27/2018 ONE DAY Omega Battles" & @CRLF & _
"Secrets and Shadows 12/ 27/ 2018 12/ 28/2018 Assault Battles" & @CRLF & _
"Endurance 12/27/2018 ONE DAY Fleet Mastery" & @CRLF & _
"Emperor's Demise 12/ 27/ 2018 12/ 28/ 2018 Mythic" & @CRLF & _
"Nightsisters and Jawas 12/28/2018 ONE DAY Omega Battles" & @CRLF & _
"Geonosian Fleet Advanced Tactic 12/28/2018 ONE DAY Fleet Mastery" & @CRLF & _
"Rebel Round-Up 12/28/2018 12/29/2018 Assault Battles" & @CRLF & _
"Daring Droid 12/ 28/ 2018 12/ 29/ 2018 Mythic" & @CRLF & _
"Resistance and Clones 12/29/2018 ONE DAY Omega Battles" & @CRLF & _
"Places of Power 12/ 29/2018 12/ 30/2018 Assault Battles" & @CRLF & _
"Pieces and Plans 12/29/2018 12/ 30/2018 Mythic" & @CRLF & _
"" & @CRLF & _
"First Order and Scoundrels 12/30/2018 ONE DAY Omega Battles" & @CRLF & _
"Defense of Dathomir 12/31/2018 1/1/2019 Heroic" & @CRLF & _
"|" & @CRLF & _
"ITB START DATE" & @CRLF & _
"" & @CRLF & _
"Imperial Retaliation 12/3/2018 Territory Battle ‘" & @CRLF & _
"Rebel Assault 12/ 13/2018 Territory Battle l" & @CRLF & _
"Imperial Retaliation 12/ 20/ 2018 Territory Battle" & @CRLF & _
"TW PREVIEW PHASE" & @CRLF & _
"" & @CRLF & _
"War 53-A 12/ 1/ 2018 Territory War" & @CRLF & _
"War 54-8 12/ 11/ 2018 Territory War |" & @CRLF & _
"War 55—A 12/ 29/ 2018 Territory War" & @CRLF & _
"War 56-3 1/ 2/ 2018 Territory War ‘"
Local $sSubst = "$2-$3.......$4 - $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