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.this works fine if I have it all on one line like [b ]bold stuff[/b ], but if I doCode: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>")
[b ]bold
stuff[/b ], it doesn't work.




I drink to make other people more interesting!
Reply With Quote