LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove string from txt file

Solved!
Go to solution

@apok wrote:

Example_VI.png


Why are you using the Delete From Array?  The Array Subset is a lot more eficient.  And then you are only using the last output.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 20
(1,408 Views)

@crossrulz wrote:

 

is a lot more eficient....


how do you mean? please show me...

0 Kudos
Message 12 of 20
(1,398 Views)

@apok wrote:

@crossrulz wrote:

 

is a lot more eficient....


how do you mean? please show me...


There is a lot involved with the Delete From Array.  The Array Subset just copies out the portion of the array you want.  The Delete From Array also has to compact the other array, creating more data copies.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 20
(1,392 Views)

You can use regular expressions to extract the data you want.

 

regex solution.png

 

Ben64

0 Kudos
Message 14 of 20
(1,390 Views)

@ben64 wrote:

You can use regular expressions to extract the data you want.


A string parsing thread can't be complete until somebody mentions regular expressions.  I'm surprised it took this long...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 15 of 20
(1,387 Views)

@crossrulz wrote:

@ben64 wrote:

You can use regular expressions to extract the data you want.


A string parsing thread can't be complete until somebody mentions regular expressions.  I'm surprised it took this long...


I'm also surprised !!

 

 

The lookahead is useless in this case. The following regex will do.

 

(\d+:\d+:\d+)(.*?) Inspection Finished

 

Ben64

0 Kudos
Message 16 of 20
(1,378 Views)

@ben64 wrote:

You can use regular expressions to extract the data you want.

 

regex solution.png

 

Ben64


Could you post the VI the drag and drop only gives me the forum link for some reason

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 17 of 20
(1,377 Views)
Solution
Accepted by topic author PauldePaor

see attached

 

Ben64

Message 18 of 20
(1,373 Views)

PauldePaor wrote:

Could you post the VI the drag and drop only gives me the forum link for some reason


Dragging straight from a web browser just doesn't work for who-knows-what reason.  But you can drag the snippet to your desktop to save the image file there and then drag from your desktop to a VI and it works.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 19 of 20
(1,367 Views)

@crossrulz wrote:

 

There is a lot involved with the Delete From Array.  The Array Subset just copies out the portion of the array you want.  The Delete From Array also has to compact the other array, creating more data copies.


hmmm....in my example, the assumed data file was to change size and will handle that. How do you handle it when the data  grows?Does the efficiency have to do with bench mark time here?

 

EDIT: i didnt see your comment on data copies....my bad Smiley Sad

0 Kudos
Message 20 of 20
(1,360 Views)