
01-16-2009, 05:09 PM
|
|
Newcomer
|
|
Join Date: Jan 2009
Posts: 1
|
|
How to Extract a word from . . .
|
I have run into a snag trying to extract a word from the output of a dos command.
Output:
Node IpAddress: [LanAddress] Scope Id: []
NetBIOS Local Name Table
Name Type Status
---------------------------------------------
PCN <00> UNIQUE Registered
Workgroup <00> GROUP Registered
PCN <20> UNIQUE Registered
Workgroup <1E> GROUP Registered
Workgroup <1D> UNIQUE Registered
..__MSBROWSE__.<01> GROUP Registered
Sorry for the formatting, it didn't come out right. Anyway The thing I want to capture is italicized.
There are several ways to capture the text, currently I have it capturing the command output and placing it into a text box, from there I can save if I wish, I can also edit what is there. It will be a config file to be run in another part of the project. The problem is the PC Names change, as do the workgroups, what is constant is the <00> UNIQUE Registered portion. I can copy forward, but have had problems moving backwards since the # of spaces between the preceding < and the last letter of the pc name depends on the name of the PC.
Any suggestions?
|
|