in reply to Creating a fill-in regexp

Here is one solution:
s/(10*1)/1 x length($1)/eg;
Note that you might want to change the * to a + depending on what you want to happen should the ones be right next to each other. updatewording was "change the * to a star", thanks L~R

-enlil