Parse a file with non-constant format (number of values)
I am currently trying to parse a text file formated like this : 

> [value1(double),value2(double];[value1(double),value2(double];...;[value1(double),value2(double]\n
> [value1(double),value2(double];[value1(double),value2(double];...;[value1(double),value2(double]\n
> etc...

This file is the result of measures made by sensors : each bracket-thingy represents the interval of values of a sensor, and each different line represents a measure.

The problem is, we sometimes switch-off certain sensors, so the file won't have the same format, so I really don't know how to do a "general" parser, which shouldn't consider the number of sensors that was switched-on.

Of course, I don't know if it's clear, this number of values is different from a file to another. I mean, in a same file, the number of values is obviously constant.

The output format would be : 

    LINE 1:
        x1min: ... (first value of the first bracket-couple)
        x1max: ... (second value of the second bracket-couple)
        x2min: ...
        x2max: ...
    etc...
    
    LINE 2:
        same here
    
    ETC
    enter code here

Some help would be much appreciated.


Have a nice day, and thank you very much.


PS : Very sorry for my poor English
Parse a file with non-constant format (number of values)
===

I am currently trying to parse a text file formated like this : 

> [value1(double),value2(double];[value1(double),value2(double];...;[value1(double),value2(double]\n
> [value1(double),value2(double];[value1(double),value2(double];...;[value1(double),value2(double]\n
> etc...

This file is the result of measures made by sensors : each bracket-thingy represents the interval of values of a sensor, and each different line represents a measure.

The problem is, we sometimes switch-off certain sensors, so the file won't have the same format, so I really don't know how to do a "general" parser, which shouldn't consider the number of sensors that was switched-on.

Of course, I don't know if it's clear, this number of values is different from a file to another. I mean, in a same file, the number of values is obviously constant.

The output format would be : 

    LINE 1:
        x1min: ... (first value of the first bracket-couple)
        x1max: ... (second value of the second bracket-couple)
        x2min: ...
        x2max: ...
    etc...
    
    LINE 2:
        same here
    
    ETC
    enter code here

Some help would be much appreciated.


Have a nice day, and thank you very much.


PS : Very sorry for my poor English