Here is the string:
$text = "aaaaaaaa[[Image:1939.jpg||thumb|right|200px|[[1939]], [[Mr. X]] is [[here]].]]bbb";
I wanna get this:
Image:1939.jpg||thumb|right|200px|[[1939]],[[Mr. X]] is [[here]].
It's a mediawiki mark format. one article has one or more image mark.
My code:
$pattern = "/\[\[Image:([\s\S]*?)\]\]/";
preg_match($pattern, $text, $match);
But i got
Image:1939.jpg||thumb|right|200px|[[1939
Please help!