Read file.dat with tfileinputregex

Six Stars

Read file.dat with tfileinputregex


I would like to read file.dat with tfileInputRegex.

Here is a screenshot of the file:


So,I need to distinguish the parts of the file by the beginning of the word "LB" because each time there is an LB it is new data to extract and i need to retrieve three fields that are framed in red.

I tried these exprssions but I still get an error



Thanks in advance.

Best regards.

Forteen Stars TRF
Forteen Stars

Re: Read file.dat with tfileinputregex

Your explaination is not very clear as you speak about 3 fields circled in red but there only 1 for lines starting with LB. Also, you don't say anything about other fields also circled in red.
I suggest you to give us the expected result based on this sample.

Six Stars

Re: Read file.dat with tfileinputregex

I try to be clear
The file.dat contains values from several sensors. I can distinguish the data of a sensor by the LB. When there is LB, it means a new sensor

I need to create 3 fields (name, value, date) to recover the fields of the sensors
-Name (which is the name of the sensor) is in the line that contains LB
 -value,date begen starts from the third line until the start of a new sensor (an anothor line with LB)

Knowing for value I can find negative values or "?" or simple value 

Here is the expected result:


My need is to create a pattern with regex to create this fields.


Thanks in advance.

Four Stars

Re: Read file.dat with tfileinputregex

you can achive this using tfileinputdelimited also. Only in column0 you have to  put LB externally.2nd_step_delimited.PNG3rd_step_delimited_file.PNG