<?php $urls=[ 'http://domain1.com/media/uploads/2017/11/image-test-1.jpg', 'https://domain2.org/photos/uploads/2016/08/anotherimage.png' ]; $urls=preg_replace('@(http[s]*?://[-\w./]+)(/[\w-]+\.(png|jpg))@','images$2',$urls); var_export($urls);
You have javascript disabled. You will not be able to edit any code.