<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT size=2>
<P>All of this is in the context of needing to convert at least 2000 text files 
located in at least 2000 subdirectories into .htm files.&nbsp; So while it is a 
"1 time" programming project, the resulting time saving and tendum saving will 
not be trivial.</P>
<P>I am trying to search for an ms-dos formated file name (eg. 8.3 form).&nbsp; 
I would like to limit it to the legal characters for a dos name rather than any 
8 characters followed by a period followed by the letters "zip".&nbsp; I am 
presuming very similar code will allow me to also search for .arc and .lhz 
files.&nbsp; I want to replace that name with the same name as a href.&nbsp; 
e.g.. tomsfile.zip &lt;a href="tomsfile.zip"&gt;tomsfile.zip&lt;/a&gt;</P>
<P>The code I am showing is adapted from the code that is converting things like 
tabs into the html equivalent in a perl script called: txt2html that a guy who 
speaks French wrote.&nbsp; I am aware the replacement string is wildly 
wrong.&nbsp; So here is my 1st approximation of the code:</P>
<P>$TXT =~ s/........\.[zip|ZIP]/&lt;a 
href="........\.zip"&gt;........\.zip&lt;/a&gt;/g;</P>
<P>Since I don't want to match against anywhite space how about this?</P>
<P>$TXT =~ s/[\d|\w](8)\.[zip|ZIP]/&lt;a 
href="........\.zip"&gt;........\.zip&lt;/a&gt;/g;</P>
<P>According to the book I am mumbling arround in:&nbsp; \d is the range of 
numbers, \w is all alphabetic characters, | lets you put two groups together so: 
[\d|\w] should allow all legal ms-dos file name characters.&nbsp; [\d|\w](8) is 
supposed to find 8 legal ms-dos file characters in a row.&nbsp;&nbsp; 
[\d|\w](8)\.[zip|ZIP] should find any legal ms-dos file name that ends in zip or 
ZIP?</P>
<P>What (if anything) am I doing wrong on the search string?</P>
<P>Once the search string is right, I want to move onto the harder question of 
how to I get this thing to replace the file name with an href to that file 
name.</P>
<P>Once I get past these questions, I have questions about trying to add file 
information (eg. size, date/time created) to this conversion).&nbsp; But right 
now, I want to struggle with this level of the code.</P>
<P>Respectfully,</P>
<P>Tom Miller</P></FONT></FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>-------------------------------------<BR>If I knew 
what I was doing, would I be posting here?<BR>Eileen Chat and 160,000 downloads 
at: <A 
href="http://www.chatnfiles.com">www.chatnfiles.com</A><BR></DIV></FONT></BODY></HTML>