also sprach William Jensen (on Thu, 15 Feb 2001 07:22:31PM -0600): > I am trying to find a regular expression that will include every file > in a directory except one named one. For example if I had a file > called index.html and then hundreds of other .html files in the same > directory, how can I do a reg expression to say "all the .html files" > except index.html? Been rack'n my brain on this one for a bit of time > and I could use some help from someone more experienced.
if you can use grep, then ls | grep -v "index\.html" should do. otherwise you are facing the same problem as i was previously, which is that the grammar of regular expressions (aside from perl's) cannot treat a word as an entity which it can negate. the closest i got was "[^i][^n][^d][^e][^x]", but this will exclude all words with i as the first character, or n as the second, or d as the third... i would be very interested in a solution... martin [greetings from the heart of the sun]# echo [EMAIL PROTECTED]:1:[EMAIL PROTECTED]@@@.net -- windoze 98: <n.> useless extension to a minor patch release for 32-bit extensions and a graphical shell for a 16-bit patch to an 8-bit operating system originally coded for a 4-bit microprocessor, written by a 2-bit company that can't stand for 1 bit of competition.