On Sat, 1 Feb 2003, Bob Ammerman wrote: *>> 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'. plp@plp:~ > echo "11111"|sed -e 's/111/1/g' -e 's/000/0/g' 111 Peter -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads