Results 1 to 7 of 7

Thread: Regex.Replace match with stuff + match?

Hybrid View

  1. #1
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Regex.Replace match with stuff + match?

    Before you get regex gung ho, try something like this:
    VB Code:
    1. Dim yourstring As String = "${Wild Bill}"
    2.         yourstring = yourstring.Replace("${", "<b>${")
    3.         yourstring = yourstring.Replace("}", "}<\b>")

  2. #2

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Re: Regex.Replace match with stuff + match?

    Quote Originally Posted by wild_bill
    Before you get regex gung ho, try something like this:
    VB Code:
    1. Dim yourstring As String = "${Wild Bill}"
    2.         yourstring = yourstring.Replace("${", "<b>${")
    3.         yourstring = yourstring.Replace("}", "}<\b>")

    Well, what if there is a "${" without a matching "}", or vice versa, which is a distinct possibility with what I'm doing...

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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