Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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 ( #1028962=note: print w/ replies, xml ) Need Help??


in reply to Re: RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3? (sprintf)
in thread RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3?

Greetings tye.
Thanks for taking the time to respond.

s{(?<=[a-z])([0-9]{1,3})(?=[.])}{ sprintf "%04d", $1 }ge;
Looks brilliant in it's simplicity. But my head is still in sed(1) scripting mode. So I fear I am not yet following it. :(

I'm attempting to sort it out now. :)

Thanks again!

#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.4";
print $perl_version;


Comment on Re^2: RE question; how to insert a digit between const[a-z]*3 && inc[0-9]*3? (sprintf)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (11)
As of 2015-07-31 20:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (282 votes), past polls