キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

Remove string from txt file

解決済み
解決策を見る

@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.



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 件の賞賛
メッセージ11/20
1,520件の閲覧回数

@crossrulz wrote:

 

is a lot more eficient....


how do you mean? please show me...

0 件の賞賛
メッセージ12/20
1,510件の閲覧回数

@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.



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 件の賞賛
メッセージ13/20
1,504件の閲覧回数

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

 

regex solution.png

 

Ben64

0 件の賞賛
メッセージ14/20
1,502件の閲覧回数

@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...



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
メッセージ15/20
1,499件の閲覧回数

@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 件の賞賛
メッセージ16/20
1,490件の閲覧回数

@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 件の賞賛
メッセージ17/20
1,489件の閲覧回数
解決策
受理者 PauldePaor

see attached

 

Ben64

メッセージ18/20
1,485件の閲覧回数

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.



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 件の賞賛
メッセージ19/20
1,479件の閲覧回数

@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 スマイリー 悲しい

0 件の賞賛
メッセージ20/20
1,472件の閲覧回数