ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

replacing Strings (again)

Hallo,

I have a string with lots of numbers in scientific notation, e.g. 1,23456E+10 (German OS). I want to save it to a spreadsheat file, but before that I want to replace all "," with "." and all "E" with "e". (Otherwise GNUplot cannot read them).
With my idea and the ideas of the LabVIEW-Forum, only the first ones were replaced.

Example: 1,0E-6 1,0E-6 becomes 1.0e-6 1,0E-6 and NOT 1.0e-6 1.0e-6

How can I manage that? The common "Search and Replace String" works but stops after the first match.

Arno

PS: Please send VI's that can be loaded with LabVIEW 6.1^.

Arno
Please help me, thank you !!


Arno


PS: I am using LabVIEW 6.1."
0 Kudos
Message 1 of 4
(2,796 Views)
Already answered here.
0 Kudos
Message 2 of 4
(2,796 Views)
Hi Arno

I am attaching a vi which converts the string in the shape u desire.

Hope it works for u. Your feedbacks are welcome.

Best Regards,
Nirmal Sharma
0 Kudos
Message 3 of 4
(2,796 Views)
The E-->e is easy, just use "to lower case". 🙂

To replace all using search and replace, just wire a TRUE to the "replace all?" terminal.

The attached example in LV6.1 shows both methods.
0 Kudos
Message 4 of 4
(2,796 Views)