MyBB Community Forums

Full Version: preg_match in mod doesn't work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have downloaded automedia and he doesn't work.
I found the problem in the preg_match code.
There is the line about problem:
if(preg_match('<a href=\"(http://)(?:fr\.)?xhamster\.com/movies/(.*?)\">isU',$message))



i think the
<a href=
is not obligatory.
There is someone a king of regulary expression for help me Big Grin
Thank you
I don't see the regex delimiter. IIRC <> is a valid pair but then matching a href= indeed doesn't make much sense.
(2015-12-29, 10:17 PM)Destroy666 Wrote: [ -> ]I don't see the regex delimiter. IIRC <> is a valid pair but then matching a href= indeed doesn't make much sense.

I wish to remove the href, which is useless.
For the moment i use this:
$url = "http://fr.xhamster.com/movies/";
	if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) === false) {


And it's ok but not with the 'www' in url