Yeah, my simple list was very simple compared to the actual list of files.  I envision the final solution would be a number of match strings strung together with "|"...<div><br></div><div>Thanks, I'll keep looking.</div>

<div><br></div><div>Dan<br><br><div class="gmail_quote">On Thu, Sep 29, 2011 at 16:15, Christopher Cashell <span dir="ltr"><<a href="mailto:topher-pm@zyp.org">topher-pm@zyp.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

2011/9/29 Dan Linder <<a href="mailto:dan@linder.org">dan@linder.org</a>>:<br>
<div class="im">> Example:<br>
> OMAWWW001<br>
> OMAWWW002<br>
> OMADNS001<br>
> ORDWWW001<br>
> ORDWWW002<br>
> ORDWWW003<br>
> ORDDNS001<br>
> ORDDNS002<br>
</div>> Any thoughts?<br>
<br>
I've dealt with a similar thing at work.  It can be incredibly tricky,<br>
depending on the names in question, how variable they are, and whether<br>
you just want to match them roughly, or if you want to match them to<br>
validate them.<br>
<br>
For example, from the data listed, they appear to be all of the form:<br>
3 letter site/city code, followed by 3 letter function/machine code,<br>
followed by a 3 digit number.  If you just wanted to catch anything<br>
that matches that format, you could possibly do something like:<br>
<br>
/\w{3}\w{3}\d{3}/<br>
<br>
Depending on the number of site/city codes and the number of<br>
function/machine codes, you could do something like (Note: start of<br>
line/field anchor added to improve performance with alternations;<br>
depending on how much data you're processing, it may not matter or be<br>
applicable):<br>
<br>
/^(OMA|ORD)(WWW|DNS)\d{3}/<br>
<br>
This would allow you to validate that not only does the 3 letter, 3<br>
letter, 3 digit form matches, but that it validates to expected site<br>
and function codes.  This also has the advantage that it works with<br>
codes that aren't exactly 3 letters (i.e. if you want to use SMTP for<br>
a mail server).<br>
<br>
If you've got a decent number of entries, you might want to reformat<br>
it with /x for increased readability:<br>
<br>
/^ (OMA|ORD|DEN|SEA|LAX)<br>
   (WWW|DNS|SMTP|IRC|DB)<br>
   \d{3} /x<br>
<br>
Without knowing more about the current names, as well as potential<br>
future names, that's probably the best I can think of.<br>
<br>
> Thanks,<br>
> DanL<br>
<font color="#888888"><br>
--<br>
Christopher<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Omaha-pm mailing list<br>
<a href="mailto:Omaha-pm@pm.org">Omaha-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/omaha-pm" target="_blank">http://mail.pm.org/mailman/listinfo/omaha-pm</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>***************** ************* *********** ******* ***** *** **<br>"Quis custodiet ipsos custodes?"<br>    (Who can watch the watchmen?)<br>

    -- from the Satires of Juvenal<br>"I do not fear computers, I fear the lack of them."<br>    -- Isaac Asimov (Author)<br>** *** ***** ******* *********** ************* *****************<br>
</div>