I am new to regex and recently faced this problem
Appending and Prepending ‘#’ in an string using only Regex
In this suppose we have string such as Hello my name is #First Name# @EducationDetail@
Now I have to append and prepend # in this using only regular expression so it will become
#Hello my name is #First Name# @EducationDetail@#
Thanks
var res = Regex.Replace(input, @"^(.*)$", "#$1#");