Hi, re.search can do the task that re.compile, for-loop, .split('\n') and re.match do simpliest. And it stops at first match. http://paste.debian.net/1068761/ Regards, Herbert