This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Search and Replace String VI Replaces End of Line Carriage Returns

Updated Aug 17, 2023

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 LabVIEW Termination Characters .