gruntydatsun Posted October 23, 2011 Posted October 23, 2011 Hello, If there are any regex experts reading, could I please get to make a regex that will extract valid file paths from a long string full of file paths. The file paths may include spaces. I am doing a dir of a folder into a variable using the /b switch then I'm trying to extract the file paths, including file names, into an array.
UEZ Posted October 23, 2011 Posted October 23, 2011 Something like that? #include <Array.au3> #include <Constants.au3> Global $run = Run(@ComSpec & " /c dir /b /a-d ", @SystemDir, @SW_HIDE, $STDOUT_CHILD) Global $lines While 1 $lines &= StdoutRead($run) If @error Then ExitLoop Wend $aContent = StringSplit(StringStripCR($lines), @LF) _ArrayDisplay($aContent) Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
gruntydatsun Posted October 23, 2011 Author Posted October 23, 2011 Thanks UEZ. Looks like I was trying to peel a potato with a swiss army knife, instead of a potato peeler.
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