It is probably not necessary to check the format of each line before processing.
It is not clear to me what your first is if statement is supposed to do.
You will need to rethink the logic to produce the desired output unless the numeric values are sorted by name.
You will need additional logic to determine single and end.
In reply to Re: Tagging the last elements
by jbt
in thread Tagging the last elements
by crochunter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |