in reply to Creating a fill-in regexp

Use the s/// substitution operator:
$string =~ s/(?<=1)(0+)(?=1)/'1' x length($1)/eg;
Hope this helped.
CombatSquirrel.
Entropy is the tendency of everything going to hell.