Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1028962]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-18 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found