LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

search Number from string

Hi all :
 
please see attach file ,, if you van see i have string that include no in it "50382".. i want two thing please
 
1- serach only for this number in string and display it
2- this is a number ,, i know it chart No ,, i want to change it ti INT32, can I do that ? this string i get from another department as it becouse that i can't control it
 
Thanks
 
 
 
0 Kudos
Message 1 of 6
(2,959 Views)

Hi elyan,

it is not that easy, because i don´t know if the design of your string is every time the same. I make an example for you. Hope it helps.

Mike

0 Kudos
Message 2 of 6
(2,949 Views)
Hello,
I've done you the vi. It's made on labview 8.5
Software developer
www.mcm-electronics.com





PORTUGAL
Download All
0 Kudos
Message 3 of 6
(2,947 Views)
Thanks alot for all of you for quick respond..
 
its working
 
 
 
 
0 Kudos
Message 4 of 6
(2,940 Views)
It's not clear from your question whether you're searcing exactly for 50382, or some sequence of numbers. If you're searching for 50382 exactly, you can simplify Jorge's example even further by simply using the Match Pattern function and using the match substring output:





Message Edited by smercurio_fc on 02-14-2008 09:26 AM
0 Kudos
Message 5 of 6
(2,914 Views)
And, if you need to search for a number, you can do something like the following:


The above will find a sequence of numbers that is at least 4 digits long. Thus, it finds 50382, but not 123.


Message Edited by smercurio_fc on 02-14-2008 09:30 AM
0 Kudos
Message 6 of 6
(2,909 Views)