SirAlonne Posted July 8, 2020 Posted July 8, 2020 Hi, Is it possible with _FileListToArrayRec to create a mask like this:(name)(space)(unknown sequence number)(space)(filetype) For example with regexp it'd be like this: Global $Name = "Lorem ipsum5 (dolor) s[it] a_met" Global $FileType = "(.psd|.ai|.blend)" Global $Pattern = "^((" & $Name & ")" & "(\h)(\d+)(\h)" & $FileType & ")$"
jguinch Posted July 8, 2020 Posted July 8, 2020 It seems it's not possible with _FileListToArrayRec to use a regex in the mask parameter. You can do it in two times : 1 - Get the list of files $array = _FileListToArrayRec($PATH, "*.ai;*.psd;*.blend") 2 - A loop from 1 to $array[0] which checks if the pattern matches with each file name and build the array that you want SirAlonne 1 Reveal hidden contents Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
SirAlonne Posted July 8, 2020 Author Posted July 8, 2020 Thanks @jguinch ! I just wanted to make sure of it before jumping into building workarounds.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now