Need to print only the first line that has a match ...
Need to print only the first line that has a match ...
(OP)
Hi,
Need to print only the first line that has a match ...
I have a line in a file :
“ 2019-02-02 17:12:02.860,10552 ,Information," Test Program Name: Something else“
And the part of the line I need is - “Test Program Name: Something else”
I’d like to print only first line that matched the strings that have the same “ Test Program Name: “
And the same for this line:
“2019-02-02 17:12:02.865,10552 ,Information,"[LOT] Product: Something else"
I need only this part of the line - “Product: Something else”
I’d like to print only the first line that matches and ignore the rest of the lines that matched.
Thank you.
Need to print only the first line that has a match ...
I have a line in a file :
“ 2019-02-02 17:12:02.860,10552 ,Information," Test Program Name: Something else“
And the part of the line I need is - “Test Program Name: Something else”
I’d like to print only first line that matched the strings that have the same “ Test Program Name: “
And the same for this line:
“2019-02-02 17:12:02.865,10552 ,Information,"[LOT] Product: Something else"
I need only this part of the line - “Product: Something else”
I’d like to print only the first line that matches and ignore the rest of the lines that matched.
Thank you.
RE: Need to print only the first line that has a match ...
For the checks you could either use a SPLIT type thing on the comma and then check the value returned in an array or perhaps use a RegEx.
Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
http://www.greggriffiths.org/livelink/
RE: Need to print only the first line that has a match ...
I'm OK now. I just reloaded the file after I found the first match.
Thank you.