My second guess would be that you are only reporting one match per paragraph and you don't look for a match in the paragraph that contains $eot. So one of the places where you think there is a "\n\n", there might actually be a "\n \n" or even "\n\r\n", which won't count as a paragraph boundary to Perl. The missing error could be clumped together with its prior error in a single paragraph that looks like 2 paragraphs. Or it could be similarly clumped with the $eot.
And it would be easier to you to debug the situation than for me to make guesses remotely.
- tye
In reply to Re^3: Example of inconsistent regex matching (\n\s+\n)
by tye
in thread Example of brainfog (Was: inconsistent regex matching)
by ww
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |