Hi,
I have a text file, which (A#,B#) pairs, that looks like"
"
A1: B1: "rank"
A2: B2: "rank term"
A3: B3: "rank term
A4: B4: rank all
A5: B5: rank all true
.."
I am trying to find errors in the 'B#:' lines if their is incorrect format.
I want to be able to print the line content OK if the syntax is OK i.e. the line has open and close quotes OR no quotes.(in above case for eg. B1,2,4 syntax is good)
I want to be able to print the line content INCORRECT if their is a syntax error i.e. the line has quotes mismatch(in above case for eg. B3 has bad syntax)
Please suggest a good 'regular expression' to find all good and bad lines in 'B#:' lines.
Any help would be great. thanks,
I have a text file, which (A#,B#) pairs, that looks like"
"
A1: B1: "rank"
A2: B2: "rank term"
A3: B3: "rank term
A4: B4: rank all
A5: B5: rank all true
.."
I am trying to find errors in the 'B#:' lines if their is incorrect format.
I want to be able to print the line content OK if the syntax is OK i.e. the line has open and close quotes OR no quotes.(in above case for eg. B1,2,4 syntax is good)
I want to be able to print the line content INCORRECT if their is a syntax error i.e. the line has quotes mismatch(in above case for eg. B3 has bad syntax)
Please suggest a good 'regular expression' to find all good and bad lines in 'B#:' lines.
Any help would be great. thanks,