<?php $array= [ 'url("images")', 'url (\'images\')', 'url(vendor/)', 'url(website/images)', "url(http://)" ]; $pattern = '/url\s*\(\s*[\'"]?+\/?+((?!http|vendor|website).+?)[\'"]?\s*\)/i'; $result=[]; foreach ($array as $test_string) { $content = preg_replace($pattern, 'url(websites/abc/www/$1)', $test_string); $result[$test_string] = $content; } print_r($result);
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`