hello ,

i'm using smarty in my scripts
i want add simple trick when smarty compile file , i want match line using preg_match , to search in compiled content and check if meta tag line isn't in compiled pag contents then return error message ,

i tried using this php code , but it's not work fine 100%
so please give me true code and what is the true file and position to put it ?

note : i puted my code in Smarty_Compiler.class.php file in compile funtion

my code :
PHP Code:
if(!preg_match('/<[\s]?meta[\s]+name=(\'|")generator(\'|")[\s]+content=(\'|")PHP v4.0 Copyright by http:\/\/www.google.com[\/]?(\'|")[\s]*[\/]?>/i',$params['contents'])){die('Error');}