On Wed, Apr 30, 2003 at 02:19:59PM -0700, johnd wrote: > > kronos# cat testfile | sed -e "s:UserID=oldid:UserID=newid:g" > newfile > > yea, the thinkg is oldid is always different, that is why I am asking > for a regex to find everthing that is UserID to the & Since you mentioned VI, this works in vim: :%s/UserID=.\{-}&/UserID=foo\&/