LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Information From File Name

Solved!
Go to solution

Hi,

 

I have a somewhat general question, is it possible to extract certain "elements" from a file name?

For example: x0 xxx abc 123 xx xxxx.avi (or any type txt, jpg, and etc...).

Assuming that the "abc" is constant throughout the files but the digits are changing (not sequential), can I extract just the "abc 123" (or whatever number it is)?

I know how to strip/build path, but here I don't know what to search since the distance from the beginning is changing and the digits are changing.

 

Thank you,

 

 

0 Kudos
Message 1 of 5
(2,806 Views)

There are several string function that allow you to search for a string, and  break the string into several parts.

 

Another option is using Regular Expression, yours sound like "abc/s[0-9]{3}", that should return the "abc 123" part.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 5
(2,793 Views)
Solution
Accepted by topic author simply_me

There are dedicated search functions for strings that you should investigate. This is a basic LabVIEW task.

 

23472iD8C9D52B59B88F37

 

 

Chilly Charly    (aka CC)
Message 3 of 5
(2,787 Views)

Hi Ton,

lurking the forums before breakfast ? 😄

Chilly Charly    (aka CC)
0 Kudos
Message 4 of 5
(2,785 Views)

Thank you both for the reply.

0 Kudos
Message 5 of 5
(2,774 Views)