You have to use the SingleLine option:
VB Code:
Dim strPattern As String = "\[B ](.*)\[/B ]" Dim linksExpression As New Regex(strPattern, RegexOptions.IgnoreCase Or RegexOptions.Singleline) Dim strTemp As String = "[B ]bold" & vbCrLf & "this[/B ]" strTemp = linksExpression.Replace(strTemp, "<b>$1</b>") MsgBox(strTemp)




Reply With Quote