<?php $strings = array("url: https://www.anysite/anything", "url: https://www.anysite/anything another word"); foreach ($strings as $string) { $url = preg_replace('/url:?\s*(\S+).*/i', '$1', $string); echo "$url\n"; }
You have javascript disabled. You will not be able to edit any code.