I would like to add a certain number of leading zeroes (say up to 3) to all numbers of a string. For example:
Input: /2009/5/song 01 of 12
/2009/5/song 01 of 12
Outpu
Using c#:
c#
string result = Regex.Replace(input, @"\d+", me => { return int.Parse(me.Value).ToString("0000"); });