<?php $str="www.google.com"; $pattern = '#(www\.|https?://)?[a-z0-9]+\.[a-z0-9]{2,4}\S*#i'; preg_match_all($pattern, $str, $matches, PREG_PATTERN_ORDER); echo $matches[0];
You have javascript disabled. You will not be able to edit any code.