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 derfloh 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
Joined
Apr 14, 2004
Messages
38
Location
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..



 
did you look at the String.IndexOf function?
 
nope..i never used it.
 
Thanks much, it works..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top