Your regex is missing delimiters (I use ~ below). A dot (.) has a
special meaning in a regex ("any character") and must therefore be
escaped (\.) if you want to match *only* a dot. (Doesn't really matter
here though.) "/*" would match zero or more slashes -- not what you want.
$url_regex = '~
http://stackoverflow\.com/questions/30747165/.+?\.html~';
> preg_match_all(url_regex, $mystring, $urls);
preg_match_all($url_regex, $mystring, $urls);
---------------^
Greetings,
Thomas
--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)