Regular Expressions [resolved]
I am trying to learn regular expressions and I have the basics down, but it is a pain. I am trying to parse the code that forums like this use: ie [b ]bold stuff[/b ], but I am having trouble if they go over multiple lines.
Code:
Dim linksExpression As Regex
Dim strPattern As String = "\[B ](.+?)\[/B ]"
linksExpression = New Regex(strPattern, RegexOptions.Multiline Or RegexOptions.IgnoreCase)
strTemp = linksExpression.Replace(strTemp, "<b>$1</b>")
this works fine if I have it all on one line like [b ]bold stuff[/b ], but if I do
[b ]bold
stuff[/b ], it doesn't work.