how to extract a substring froma file

hi all, I'm really newbie on this and I need some help.
how is the best way to extract a strig or substring from a each line in a file.

e.g. I want to print only this ERROR=JUD+the followed numbers from one line like this one, considering the numbers change related to different errors

.....bla+|ERRORDESC=JUD049+The+dimension+is+invalid+Failed+to+find+a+dimension+value+for+endeca+navigation+parameter+%3A+Endec
aNavigationParameter+%3A+%5B+EndecaDimension+-+%27Holiday+Type%27+%28id%3D0%29+%5D%2C+%5B+Dimension+Node+%3A+name+%3D+City+Break%2C+id+%3D+0%2C+src+%3D+null+
%5D|ERROR=JUD049|sourceRUID=bla......

considering the line is much longer I just paste part of it.
maybe with SED or awk can help any guru?
thanks

go it

sed -n 's/.*\(ERROR=JUD...\).*/\1/p' <file>

thanks :slight_smile: