Thanks a lot for this code and sorry for the delayed feedback.
I try to made some tests today and the code covers most needs. The only point which fails is matching block on /^[=]+$/ (note this regexp is not accepted for block matching).
my $lookahead_regex = qr/\w+[=:]/;
my $lookahead_regex = qr/[=:][=:][=:]+/; both fail.
I can't manage to match block separator as 'headerX:' (work) AND '=========[=]+' (don't work for now)
advices ? I'll try to continue to work on it in the next days.
Thanks a lot