How to match bare urls with regex in PHP? -
How to match bare urls with regex in PHP? -
$bits = preg_split('#((?:https?|ftp)://[^\s\'"<>()]+)#s', $token->data, -1, preg_split_delim_capture);
say,i'm trying match urls need linkified.the above permissive.
i want match simple urls http://google.com
, not <a href="http://google.com">http://google.com</a>
, or <iframe src="http://google.com"></iframe>
it appears you're trying parse html using regular expressions. you might want rethink that.
php regex url
Comments
Post a Comment