Remove the last Line-Feed character in LabVIEW data flow

在LabVIEW中,去掉每一行末尾的换行符。

How to remove the last line-feed char in a string variable.

There’s been a discussion in the NI forum. Original post can be accessed with this link:

Remove the last Line-Feed character at the end of Array to Spreadsheet String.vi

http://forums.ni.com/t5/LabVIEW/Remove-the-last-Line-Feed-character-at-the-end-of-Array-to/td-p/257251

To summary the post, the suggested way to get rid of the ending line-feed char is using regular expression to filter the string. The referred regular expression is [\r\n]*$. This means a CRLF char (which is used as new-line symbol in Windows) at the end of a line. Use the Regular Expression block to filter out this char.

Advertisements
  1. 留下评论

Log in or fill out contact info to leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: