in reply to scalable chomping

sed s/X/Y/ data.txt | sed /a/b/ >out.txt
should be scalable in programming and execution time. I've not seen a benchmark shootout on substitutions...