I have a string. I want to replace "d" with "dd", using Regex.Replace, but only if the d is not repeating.
For example, if the string is "m/d/yy", i want to change it to "m/dd/yy". However, if the string is "m/dd/yy", i want to keep it the same, and NOT change it to "m/dddd/yy".
How do I do this? I tried Reg.Replace(datePattern, "\bd\b", "dd"), but that doesn't seem to work.