I'm familiar with using a Regular Expression to replace text within a string, but I'm trying to figure out how to use it to replace text BETWEEN two strings.
Anyone have any ideas how to do this?
I want to replace everything between:
<!-- BEGIN -->
and
<!-- END -->
coffeebean
9:45 pm on Apr 25, 2005 (gmt 0)
string ResultString = null;
ResultString = Regex.Replace(SubjectString, "(<!-- BEGIN -->)([\\s\\S]+)(<!-- END -->)", "$1Replacement text here$3");