- preg_match: documentation ( source)
- print_r: documentation ( source)
<?php
$s = $_SERVER["REQUEST_URI"];
$s = 'http://www.suredeal.com.au/all-deals/deal/3490?edm=10264&email=jo.f%40mpiremedia.com.au&utm_medium=email&utm_campaign=DUPLICATEDTWO+Pillows+Delivered+to+Your+Door+-+Choose+From+Three+Pillow+Types&utm_content=DUPLICATEDTWO+Pillows+Delivered+to+Your+Door+-+Choose+From+Three+Pillow+Types+CID_e497ad0eca52779f8185ed9f05062871&utm_source=Email%20marketing%20software';
preg_match($s,'//deal/\d+?/',$res);
print_r($res);