$re = '/0\R+(.+)\R(?:(?!CDN)(?!^0$)[\s\S])+(?:\RCDN\$\h+(\d+\.\d+))?(?:\RCDN\$\h+(\d+\.\d+))?\R(?:(?!^0$)[\s\S])+/m';
$str = '
0
South Park™: The Stick of Truth™
OVERALL REVIEWS:
OVERWHELMINGLY POSITIVE
RELEASE DATE:
3 MAR, 2014
-75%
CDN$ 39.99
CDN$ 9.99
Add to Cart
RPGComedyAdventureFunnyTurn-Based
Added on 8/9/2020 ( remove )
0
Grand Theft Auto V
OVERALL REVIEWS:
VERY POSITIVE
RELEASE DATE:
13 APR, 2015
View Details
Open WorldActionMultiplayerAutomobile SimCrime
Added on 1/15/2020 ( remove )
0
System Shock
OVERALL REVIEWS:
NO USER REVIEWS
RELEASE DATE:
SUMMER 2021
CDN$ 51.49
Add to Cart
ActionAdventureCyberpunkSci-fiImmersive Sim
Added on 6/9/2020 ( remove )
';
$subst = "$1 $2 $3\n";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$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 PHP, please visit: http://php.net/manual/en/ref.pcre.php