cat /etc/apt/sources.list | sed 's/text1/text2/g' > out.txt
or with different 'slash':
cat /etc/apt/sources.list | sed 's|text1|text2|g' > out.txt
Multiple substitution:
cat /etc/apt/sources.list | sed -e 's/text1/text2/g' -e 's/text3/text4/g' > out.txt
Delete lines containing 'blabla' string:
cat some.txt | sed -e '/blabla/d' > out.txt