adsense

Tuesday, December 10, 2019

Replace last charactor

I had a requirement where I need to replace all occurrences of \ in end of a string.

Regex helped me to achieved the expected result. The code for this is as shown below.

Regex.Replace(txtDomain.Text.Trim, "/+$", "")


Cheers
Samitha