I am trying to use regex replace to remove everything in a string strtext between two tags, but it is not working. "Everything" here is html code spread over a couple of lines, basically a table with plenty of spaces etc. At the start is the tag "#StartPreviousEmail#, at the end the tag #EndPreviousEmail#
Here is what I am currently using, but it does not work:-
Set regEx = New RegExp
regEx.Global = True
regEx.IgnoreCase = True
regEx.Pattern = "#StartPreviousEmail#([^#]+)#EndPreviousEmail#"
strText = regEx.Replace(strText,"")
Grateful for correct way to do this. Thanks