How to 'System.Text.RegularExpressions.Regex.Replace'

Hi,

I suppose your requirement is not very clear, however the following will work.

System.Text.RegularExpressions.Regex.Replace(yourString,"(?<=\d{2})(\d{2})(?=\d{2})","-$1-")

Regards,

3 Likes