Hi! Thank you Lenz for digging around! Everything seems to be working fine with the -E flag and the updated regex. I also installed GNU sed version 4.2.2 and everything worked great with the same regex and -E. – Jaakko