Sign in to follow this  
Followers 0
tbaror

Trying to build the right expression

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



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")

:D


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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0