Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expressions: look for a string that doen't have a substring

Status
Not open for further replies.

cfprg

Programmer
Apr 14, 2004
38
US
I am parsing a file that has information as below:


port x: id (yy) Vendor: xxy SN: xxxxxxxxx
port x: id (zd) Vendor: xyz SN : xxxxyyyy
"
"
"

port x: id AZ SDWES x-Port xx:xx:xx:xx:xx:xx:xx:xx
port x: id DW WDES x-Port xx:xx:xx:xx:xx:xx:xx:xx
"
"
"

I don't want to get info of the port that has vendor (i.e. the string that has Vendor in it..)

which means, I don't want:
port x: id (yy) Vendor: xxy SN: xxxxxxxxx

but I want:
port x: id AZ SDWES x-Port xx:xx:xx:xx:xx:xx:xx:xx

Any ideas would be appreciated..



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top