Trimming a String

Results 1 to 3 of 3

Thread: Trimming a String

  1. #1
    Join Date
    Dec 1969

    Default Trimming a String

    Anybody know of a nice way to trim out the letters in a string. For instance say I have a string that has both letters and numbers in it. I only want the numbers. Thanks

  2. #2
    Join Date
    Dec 1969

    Default Lookup Regular Expressions...

    Try searching for Regualr Expressions.. theya re great and you can easily pull out numbers, letters, special charactes, etc.. <BR><BR>I don&#039;t remember the code to pull out numbes off hand, but a search on Google should help you out!

  3. #3
    Join Date
    Dec 1969

    Default RE: Trimming a String

    This will trim out all non numeric characters. If you want to change what it replaces just change the patter from /D to some other valid regular expression.<BR><BR>Dim regEx : Set regEx = New RegExp<BR>RegEx.Pattern = "/D"<BR>While RegEx.Test(SourceString)<BR> SourceString = regEx.Replace(SourceString, "")<BR>Wend<BR>

Posting Permissions

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