LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract numbers from string

Solved!
Go to solution

I have image files and I want to extract the nuumbers in the image file name. All my image files look like this:

 

{1D5A0279-41E9} 29.05.2014 17-22-58.59 x1566x1375x2768x2577.png

 

I want to just extract the number after the first x and the second x. I have tried using Match Pattern and then converting them with Fract/Exp String to Number but the output is not always constant of the position I need. How would I go about this? 

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 1 of 6
(7,606 Views)

Hey,

 

either take the scan from string function

 

or split the string at the x to extract the value

 

Regards,

CMW

0 Kudos
Message 2 of 6
(7,605 Views)

How will I scan from the first x take the number and scan the second and take that number also?

----------------------------------------------------------------------------------
I have not lost my mind, it's backed up on a disk somewhere
0 Kudos
Message 3 of 6
(7,594 Views)
Solution
Accepted by topic author PauldePaor

How about using "Spreadsheet string to Array" like this?

 

ExtractNumber.png

-----

The best solution is the one you find it by yourself
Message 4 of 6
(7,585 Views)

or this way,

 

scanfromstring.png

 

btw: I wouldn't use special characters and dots in file names.

 

Regards,

CMW

Message 5 of 6
(7,577 Views)

Using regular expression

 

using regex.png

Message 6 of 6
(7,538 Views)