From: Stephen Fickas Date: 2008-03-07T04:01:47+09:00 Subject: Sequence reduction I'd like to take a string like that below "0011122234667889" and reduce to "012346789" I can see ways to do it for a single digit, but not all in one fell swoop: "0011122234667889".gsub(/1{2,}/, "1") #reduce seq (2 or more) of 1s to single 1 "0011122234667889".gsub(/1+/, "1") #1 or more 1s to single 1 Thanks for any help. Steve