Ben basit bir regex bulurum ve PHP komut vurgulama benim sözdizimi için PHP ile değiştirmeniz gerekir.
Aslında böyle bir dizeye okunan bir bütün php dosya olacak kod dizesini almak gerekir.
$code_string = 'the whole source code of a php file will be held in this string';
Ve sonra tüm bu tekrarlarını bulmak ve bir değiştiririm ...
Find: [php] and replace with <pre class="brush: php;">
Find: [/php] and replace with </pre>
Find [javascript] and replace with <pre class="brush: js;">
Find: [/javascript] and replace with </pre>
Birisi bu konuda lütfen bana yardımcı olabilir ben gerçekten regex iyi değilim?