>>911
ありがとうございます
preg_replaceですが、容量の大きなhtmlファイル(491KB)では動作しなかったのですが

replace.php
function replace(){
 }






これはPHPのメモリ割り当て量の設定が必要ということですか?