Results 1 to 6 of 6

Thread: [RESOLVED] Variable That Equals Anything

Threaded View

  1. #3

    Thread Starter
    Junior Member
    Join Date
    May 2012
    Posts
    20

    Post Re: Variable That Equals Anything

    Quote Originally Posted by jmcilhinney View Post
    You would use a regular expression for this. I'm far from an expert with regular expressions so I usually give them a miss but this seemed like a rather easy one so I figured I'd give it a go. This worked for me in my one simple test:
    vb.net Code:
    1. RichTextBox1.Text = Regex.Replace(RichTextBox1.Text,
    2.                                   "\d-\d-\d",
    3.                                   String.Empty)
    The "\d" in the pattern stands for any numeric digit.
    Only thing is the Regex? It says it's not declared. What is it?

    Edit: It also doesn't work because it takes your
    Code:
    Replace(RichTextBox1.Text, "\d-\d-\d",
    Literaly and if you type \d-\d-\d then it will empty the string, but numbers will not work.
    Last edited by ImSimplyLegit; Jul 3rd, 2012 at 01:07 AM.

Tags for this Thread

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