in reply to
Creating a fill-in regexp
Use the
s///
substitution operator:
$string =~ s/(?<=1)(0+)(?=1)/'1' x length($1)/eg;
[download]
Hope this helped.
CombatSquirrel
.
Entropy is the tendency of everything going to hell.
Comment on
Re: Creating a fill-in regexp
Select
or
Download
Code
In Section
Seekers of Perl Wisdom