vorhandene Subparts finden
function findSubparts() { $matches = array(); preg_match_all( '/<!-- *(###)([A-Z]([A-Z0-9_]*[A-Z0-9])?)(###)/', $templateCode, $matches ); return array_unique($matches[2]); }
vorhandene Marker finden
function findMarkers() { $matches = array(); preg_match_all( '/(###)(([A-Z0-9_]*[A-Z0-9])?)(###)/', $templateCode, $matches ); $markerNames = array_unique($matches[2]); return '#'.implode('#', $markerNames).'#'; }