You're right. Was naming the first block of code you wrote as "the squished version". Of course it was not :)
Actually I've been realizing that there's no way other than using either a regex to test on the evaluated current line or a flag variable. At this point it seems to me the second approach might be the most efficient in computational terms.
Many thanks for your help :)