tbaror Posted March 30, 2009 Share Posted March 30, 2009 Hi,I need to build a command line utility capturing the cli using $CmdLineRaw and doing interpretation using StringRegExp The cli structure will always begin with - sign followed by letter -w -s etc.. next value # could be up to 9 digit could be with or without space from the "-w999 or -w 999" or word like -configfile or -wizard now i am tackling myself how to create the right expression and insert each command into array? Link to comment Share on other sites More sharing options...
PsaltyDS Posted March 30, 2009 Share Posted March 30, 2009 Hi, I need to build a command line utility capturing the cli using $CmdLineRaw and doing interpretation using StringRegExp The cli structure will always begin with - sign followed by letter -w -s etc.. next value # could be up to 9 digit could be with or without space from the "-w999 or -w 999" or word like -configfile or -wizard now i am tackling myself how to create the right expression and insert each command into array? You really know how to troll for RegExp geeks, don't you? #include <Array.au3> $simCommandLineRaw = "C:\MyDir\MySub-dir\MyScript.exe -x0 -a1 -b 22 -c333-d four-ffive" $avRET = StringRegExp($simCommandLineRaw, "(?:.+\.exe )*(?:-)([[:alpha:]] *[[:alnum:]]+)", 3) _ArrayDisplay($avRET, "$avRET") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
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