Results 1 to 8 of 8

Thread: Regular Expressions [resolved]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    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.
    Last edited by blindlizard; Sep 23rd, 2003 at 02:51 PM.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width