in reply to RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3?
s{(?<=[a-z])([0-9]{1,3})(?=[.])}{ sprintf "%04d", $1 }ge;
...with whatever additions are needed near the start and end of that regex in order to only match the parts that you want to.
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3? (sprintf)
by hdb (Monsignor) on Apr 16, 2013 at 06:43 UTC | |
by tye (Sage) on Apr 16, 2013 at 13:54 UTC | |
by taint (Chaplain) on Apr 16, 2013 at 16:21 UTC | |
by tye (Sage) on Apr 16, 2013 at 16:36 UTC | |
by taint (Chaplain) on Apr 16, 2013 at 16:46 UTC | |
Re^2: RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3? (sprintf)
by taint (Chaplain) on Apr 16, 2013 at 16:58 UTC |
In Section
Seekers of Perl Wisdom