Use sprintf and the /e switch on the regex:
s/(\d+)/sprintf '%04d', $1/e
In reply to Re: printf formatting in regular expressions?
by GrandFather
in thread printf formatting in regular expressions?
by bunnym4n
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |