#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)0\R+(.+)\R(?:(?!CDN)(?!^0$)[\s\S])+(?:\RCDN\$\h+(\d+\.\d+))?(?:\RCDN\$\h+(\d+\.\d+))?\R(?:(?!^0$)[\s\S])+"
Local $sString = "" & @CRLF & _
"0" & @CRLF & _
"" & @CRLF & _
"South Park™: The Stick of Truth™" & @CRLF & _
"OVERALL REVIEWS:" & @CRLF & _
"OVERWHELMINGLY POSITIVE" & @CRLF & _
"RELEASE DATE:" & @CRLF & _
"3 MAR, 2014" & @CRLF & _
"-75%" & @CRLF & _
"CDN$ 39.99" & @CRLF & _
"CDN$ 9.99" & @CRLF & _
"Add to Cart" & @CRLF & _
"RPGComedyAdventureFunnyTurn-Based" & @CRLF & _
"Added on 8/9/2020 ( remove )" & @CRLF & _
"" & @CRLF & _
"0" & @CRLF & _
"" & @CRLF & _
"Grand Theft Auto V" & @CRLF & _
"OVERALL REVIEWS:" & @CRLF & _
"VERY POSITIVE" & @CRLF & _
"RELEASE DATE:" & @CRLF & _
"13 APR, 2015" & @CRLF & _
"View Details" & @CRLF & _
"Open WorldActionMultiplayerAutomobile SimCrime" & @CRLF & _
"Added on 1/15/2020 ( remove )" & @CRLF & _
"" & @CRLF & _
"0" & @CRLF & _
"" & @CRLF & _
"System Shock" & @CRLF & _
"OVERALL REVIEWS:" & @CRLF & _
"NO USER REVIEWS" & @CRLF & _
"RELEASE DATE:" & @CRLF & _
"SUMMER 2021" & @CRLF & _
"CDN$ 51.49" & @CRLF & _
"Add to Cart" & @CRLF & _
"ActionAdventureCyberpunkSci-fiImmersive Sim" & @CRLF & _
"Added on 6/9/2020 ( remove )" & @CRLF & _
""
Local $sSubst = "$1 $2 $3\n"
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