Hi All,
I am new to
java coding. so need suggestion on reading the log file using java code.
1) I wish to parse a file, and find a value for variable e.g. [StorageVersion].
2) After finding the value, it will be pushed to database.
Following is the code that i have written till now.
*************************
Sample Log File
{
//NAME
[1.2.2917] := s['3.4.454545'];
//Parameter
[1.2.2947] := s['1.2.56778'];
//Enabled
[1.2.3910] := B['22.43434.12232'];
//MAXCLOUMNNAME
[1.2.4217] := N['1.7.899982'];
//StorageVersion
[1.2.2917] := K[
'706146.0.22106932'];
}
************************
Help required :
1) I don't know what regular expression can i use.
2) I want a line to check that preceding line should have //StorageVersion .
3) n then i will check any
string between
:= K[' and
'];. From above log file
"'706146.0.22106932'" is the value that i am looking for.
Thanks
Rishi