Search and Replace String VI Replaces End of Line Carriage Returns

Updated Aug 17, 2023

Reported In


  • LabVIEW

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?


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 .