$content="<span>[[!redate?&date=`[[*date_show]]`]]</span>";
preg_match_all("/\[\[(.+?)\]\]/s",$content,$content_function);
print_r($content_function);
Array
(
[0] => Array
(
[0] => [[!redate?&date=`[[*date_show]]
)
[1] => Array
(
[0] => !redate?&date=`[[*date_show
)
)
Array
(
[0] => Array
(
[0] => [[!redate?&date=`[[*date_show]]`]]
)
[1] => Array
(
[0] => !redate?&date=`[[*date_show]]
)
)
$content="<span>[[!redate]]</span>";
$content="<span>[[!redate?&date=`[[*date_show]]`]]</span>[[*date_show]]";
preg_match_all("~\[\[((?:(?R)|.)*?)]]~",$content,$content_function);