I have to develop a simple parser, to read "block" of text for example:
/TEST
{. text .}
/TEST_DATA
{. infs .}
and, I need to read informations of inside of label.... and... the file with have this informations... have a lot of labels, with the same perfil
for example:
/TEST
{. text .}
/TEST_DATA
{. infs .}
/LBL1
{. text .}
/LBL1_DATA
{. infs .}
/LBL2
{. text .}
/LBL2_DATA
{. infs .}
/LBL3
{. text .}
/LBL3_DATA
{. infs .}
i need to read the block of specif label, for example:
parseFile("FileName.txt", LBL1)
and the function, return for me, the text of inside the blocks: LBL1 and LBL1_DATA or, return for me, the content of LBL1 and LBL1_DATA
I don't know, how I can do this :xxx I need help ;x
Thanks.