http://qs321.pair.com?node_id=483757


in reply to Strange regex behavior - beware chunk boundaries!

f anyone can enlighten me as to what is wrong I would greatly appreciate it.

You might find Matching in Huge Files useful. It describes a technique for matching across chunk boundaries without having to first suck the entire file into memory.