You probably have to define a structure of head-comments like :
For Global comment like C
match one /* and stop when another */ (this his your header.
or for Line-comment like Perl
#
# Here is your header until you've got a \n in your comment
#
<- (here \n)
# Here another comment
I hope I really undestand your question, because I am not sure...
BobiOne
KenoBi ;)