Sorry for the late reply, I was away a couple of days! Happy new year BTW :)
Yeah, I tried inserting both a blank line (counted as zero) and one containing "foo800bar" (counted as 800). Sure, that's just as easily fixed by tweaking the regexp as the file slurping but I'm not sure it would be quite as easy for the OP, especially as he'd have to spot these things first. If the original solution both works for files of arbitrary size and does some simple format validation without any extra effort, IMHO that's the way to go.
In reply to Re^4: Getting the right count
by mbethke
in thread Getting the right count
by dukea2006
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |