Warrior Of Light
fighting the good fight   [and slacking off occasionally]
ramblings
what's new
quotes 1
wisdom in a sentence
quotes 2
crack a smile
poetry
not mine, don't worry
campfire
spiritual notes
marriage
the good and the funny
contact form
subscribe or vent

Answer to the NIC-list question

There are a few different ways to do this. The simplest and the least effective one involves a CTRL-C and a lot of CTRL-V. Next one that I came up with before I found out about RegEx's is using a combination of Excel and above-mentioned CTRL-C and CTRL-V. I would open a new Excel sheet, type "Link Driver " in the first cell, highlight as many cells down as I have entries for the drivers then "fill down." Next I would copy and paste the list of drivers in the second column then export the file as a "Comma delimited text." You still have to use CTRL-V to paste "FRAME Ethernet_II" under each of those lines.

The best solution of course is to use a text editor with regular expressions. For example, to resolve that last problem, all I had to do is type this text in the "Find" field:

(.*)(\.lan)
And this text in the "Replace With" field:
Link Driver \1\2
     FRAME Ethernet_II

Parentheses create a backreference which can be referred to later, dot means "any character," apostrophe means "match 0 or more times" and (\.lan) will match .lan at the end of each line as well as create a backreference. Because dot has a special meaning - "any character" - if you want to specify just the dot, you have to precede it with a backslash. To put it shortly, (.*)(\.lan) will match any number of characters up to the point where .lan appears and create a backreference to that first combination of characters as well as create another backreference to the .lan portion.

In the "Replace With" field we have "Link Driver \1\2" and "FRAME Ethernet_II" on the second line. As you can guess, Link Driver is just that, while \1 refers to the first backreference and \2 refers to the second one. So, this field says to replace whatever we matched with the words Link Driver, a space, whatever the first part of the match was then whatever the second part of the match was. If I wanted to, I could have replaced "Link Driver \1\2" with "Link Driver \1.lan" and still get the same result.

Design by Type-A-Consulting.com Copyright © 1999-2008, WarriorOfLight.com. All Rights Reserved.