I would loop over the input and try to match the head-lines and fieldelements of the object-groups.
Then either call specialized subroutines which do the parsing of the following indented lines of the recognized group or raise a warning for an unknown group.
Like this your data will also be evaluated for correctness.
Sorry no code.
Cheers Rolf
In reply to Re: Help on multiline regex
by LanX
in thread Help on multiline regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |