in reply to printf formatting in regular expressions?
Use sprintf and the /e switch on the regex:
s/(\d+)/sprintf '%04d', $1/e
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: printf formatting in regular expressions?
by bunnym4n (Novice) on Oct 05, 2008 at 21:04 UTC |