sub _get_filter { my $self = shift; my @ret; if ($self->{autoDeleteHeader}) { push @ret, sub { my $tmpl = shift; my $header; ###if ($$tmpl =~s{^.+?'"]*|".*?"|'.*?')+>}{}msi) { if ($$tmpl =~s{(^.+?'"]*|".*?"|'.*?')+>)}{}msi) { ###$self->{header} = $&; $self->{header} = $1; &tokenizer_header($self); } else { # header doesn't exist undef $self->{header}; undef $self->{tokens}; } $$tmpl =~ s{.+}{}msi; }; } return \@ret; }