What is wrong with this regex '/<\/?table[>]?>/'
I am using it with this code
$files=`find /home/bubblenut/httpd/test1`;
$files=explode("\n",$files);
$counf_f=count($files);
$regex4='/<\/?table[^>]*?>/';
for($i=0;$i<$count_f;$i++) {
if(!check($files[$i])) {
continue;
} else {
$string=get_file($files[$i]);
$split=strip_code($string);
for($j=0;$j<count($split['html']);$j++) {
$split['html'][$j]=preg_replace($regex4,'',$split['html'][$j]);
}
}
}
?>
check checks that the item is a file rather than a directory.
get_file just returns the contents of the file
strip_code divides the contents into php code, html, and possible php variables (I know this bit works as I have tested it thoroughly)
The program is not supposed to output anything I just want to get it running and then I'll start analizing the output. If I comment out the preg_replace then it all goes through fine if I comment out the preg_replace.
Thanks
Bubble