Dim StringWithHtmlBreaks As String = "one <br> two <br/> three <bR /> four <br > five"
Dim re As String = "\<[Bb][Rr](?: *\/)?\>"
'matches <
'followed by B or b
'followed by R or r
'followed by this sequence 0 or 1 times:
' 0 or more spaces
' followed by /
'followed by >
Dim StringWithSpaceBreaks As String = Regex.Replace(re, StringWithHtmlBreaks, " ")
'doesn't match <br > by design, although it'd be easy enough to do
Log(StringWithHtmlBreaks)
Log(StringWithSpaceBreaks)
'Log(Regex.Replace( re , StringWithHtmlBreaks, " " )) 'leaces spaces intact (and adds a new one to replace the <BR>
'Log(Regex.Replace(" *" & re & " *", StringWithHtmlBreaks, " " )) 'deletes spaces before and after ie reduces to single space
'
'Log(Regex.Replace( re , StringWithHtmlBreaks, CRLF)) 'leaves spaces intact
'Log(Regex.Replace(" *" & re , StringWithHtmlBreaks, CRLF)) 'deletes spaces at end of line
'Log(Regex.Replace(" *" & re & " *", StringWithHtmlBreaks, CRLF)) 'deletes spaces at end of line and start of following line