Please help
This program is to check if the unit is pass or fail
unit 1 all step pass = pass
unit 2 one of the step is fail = fail
Unit 3 all step pass = pass
1. user browse txt file display in textbox
2. hit "run button"
3. count unit pass or fail.
I want the software reading the text until detect the word "unit" then start counting how many "pass".
If 3 "pass" means unit 1 = pass . then count again if detect the word "unit".
Text box info :
name:bla bla
date:28/2/2013
time:00:12
Unit Step result
Unit 1 001 pass
002 pass
003 pass
unit 2 001 fail
002 pass
003 pass
unit 3 001 pass
002 pass
003 pass
my coding
above coding only can count how many pass or fail inside the text file
but i want calculate each unit is pass of fail.
please help.
This program is to check if the unit is pass or fail
unit 1 all step pass = pass
unit 2 one of the step is fail = fail
Unit 3 all step pass = pass
1. user browse txt file display in textbox
2. hit "run button"
3. count unit pass or fail.
I want the software reading the text until detect the word "unit" then start counting how many "pass".
If 3 "pass" means unit 1 = pass . then count again if detect the word "unit".
Text box info :
name:bla bla
date:28/2/2013
time:00:12
Unit Step result
Unit 1 001 pass
002 pass
003 pass
unit 2 001 fail
002 pass
003 pass
unit 3 001 pass
002 pass
003 pass
my coding
Dim wordString As String wordString = Me.TextBox1.Text.ToString() Dim wrdCnt As MatchCollection = Regex.Matches(wordString, "FAIL") Dim wrdCnt2 As MatchCollection = Regex.Matches(wordString, "PASS") Dim Value1 = wrdCnt.Count.ToString() Dim value2 = wrdCnt2.Count.ToString() result1.Text = value2 result2.Text = Value1
above coding only can count how many pass or fail inside the text file
but i want calculate each unit is pass of fail.
please help.