pake ragex: (https?
/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?
seperti:
$text = "lorem ipsum http://www.example.com";
$regex = '#(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?#s';
if(preg_match($regex, $text)){
echo 'tidak boleh ada url';
}