parsing an alpha/numeric string

Results 1 to 3 of 3

Thread: parsing an alpha/numeric string

  1. #1
    Bailey Guest

    Default parsing an alpha/numeric string

    I'm stumped. Does VBS have a function comparable to JavaScript's substring? I am trying to parse the name of file names based on a set naming convention. The convention is that the the first letter is the alpha designation for the year, the second letter is the alpha designation for the month. The final three characters are numeric starting with the first file of the month being 000. So the first file of the year of the first year that they began naming files like this is AA001. The first file of February of that year was AB001, the second file of the next year of February is BB002. Got it? Sorry, a little too much description. This is my problem. I need to create an automatic naming convention. It is easy to get the alpha designation, but how do I count how many BBs or AB's there are? I can't think of a way to split the string between the alpha and the numeric part. The split() function needs a set deliminator, right? And StrComp() function compares the entire string and doesn't except wildcards, right? It looks like VB5.0 might offer some help, but I'm stuck with 4.0. I'm sure there is a way to do this. Is there a way to put every character into an array, maybe? Any help would be GREATLY appreciated and will save more than one hair follicle. Thank you! Bailey

  2. #2
    frank sinatra Guest

    Default RE: parsing an alpha/numeric string<BR><BR><BR><BR>

  3. #3
    Bailey Guest

    Default RE: parsing an alpha/numeric string

    PERFECT! Thanks a ton

Posting Permissions

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