+ Reply to Thread
Results 1 to 2 of 2

How to ignore strings that don't match a certian format?

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2008
    Location
    Planet Earth
    Posts
    8

    How to ignore strings that don't match a certian format?

    I am getting an array of strings based on all the files in a directory.

    If I am only concerned with strings of the format #####XXXX######-###.jpg, how can I get it to ignore ones that do not fit the format? I am concerned that If "bad" ones get in, it could cause problems when I am trying to do operations with them.

    ex: I would want a file called 16800EBHR052708-001.JPG, but would not want records.doc, DMC1234.Jpg, etc...

    so If I have Pics() As String what can I do to it to remove unwanted entries?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Take a look at VBA Help for the Like operator.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1