Search and Replace String VI Replaces End of Line Carriage Returns

Updated May 2, 2018

Reported In

Software

  • LabVIEW
  • LabVIEW NXG

Issue Details

I am using the Search and Replace String VI and when I try to strip the spaces and substitute with tabs, the VI also replaces the carriage returns that I have in place. How do I change this behavior to only strip the spaces and nothing else?

Solution

It is listed in this help file that: 

"\s - Matches any white space character; includes space, newline, tab, carriage return, and so on"

Therefore, replace "[\s]+" with a blank space character "[ ]+" for requested behavior.

Additional Information

To substitute all spaces with a tab, use the expression [\s]+.
For information on the differences between "end of line" characters, please review this KB.

WAS THIS ARTICLE HELPFUL?

Not Helpful