replace words in sed using regular expression

hi,

I need to replace all these lines from my text file

123end
234end
324end
234end
989end
258end
924end

At the moment I know how to replace "end". But I want to replace the numbers before end as well. How can I do this ?

sed s/end/newWord/ myfile.txt newFile.txt

thanks

i beleive you have to do it one by one...

sed -e "s/^123/.../" -e "s/^234/.../" ......

 
sed 's/[0-9]*end//' infile

To delete those lines rather than print empty lines:

sed -e '/^[0-9]\{3\}end$/d' myfile.txt > newFile.txt

or

awk '!/^[0-9][0-9][0-9]end$/' myfile.txt > newFile.txt