> Yeah. Why not give a hint that works (but not in C): > > sed -e 's/111/1/g' -e 's/000/0/g' Sorry, that solution doesn't work. It will convert the string '11111' to '11', not '111'. Bob Ammerman RAm Systems -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads