3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = "http://avenir-voirie.tetraconcept.com/wp-content/uploads/2010/11/IMG_1345-682x1024.jpg"; $pattern = "/(-[0-9]{1,4}x[0-9]{1,4})(\.jpg)/"; echo preg_replace($pattern,'$2',$str);
based on oLX4q
Output for 4.3.0 - 7.2.0
http://avenir-voirie.tetraconcept.com/wp-content/uploads/2010/11/IMG_1345.jpg