Message 1 of 5
extract data from a string (filename)

Not applicable
08-13-2014
10:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I have filenames that follow a certain pattern, but aren't always the same number of characters long. I wondered how it is possible to extract each part of the filename.
For example:
M&N C-3456 Cutomer Name REVA 101234A1
where:
M&N = Constant company name (won't change)
C-3456 = Job Number
Customer Name = Self-Explanatory, indefinite length and number of words
**REVA = Revision Number (i would only need the A part)
**101234A1 = Main company job number (101234) and Add-on number (A1, also not always present when job number is)
** not always present
I was thinking if only wcmatch returned the exact strings it found to match the wildcard patterns I would be in business. I'm guessing theres something obvious i'm not getting.