Trying to run a program with a path /release/0.0.0.100/program.exe
where /release
always contains only one folder with a changing version number in the pattern of \d.\d.\d.\d\d\d
. Is there a way to find /
and run the program using wsh javascript or other scripting language?
-
too lazy to work out the details, but the documentation you need is here: msdn.microsoft.com/en-us/library/ee236359%28v=vs.84%29.aspxBen Brammer– Ben Brammer06/09/2013 21:21:25Commented Jun 9, 2013 at 21:21
Add a comment
|
1 Answer
This regex will do the match part, I modified your expression so that the dots where also escaped \.
. In a regular expression a .
means to match any character whereas an escaped dot \.
will match a literal dot .
. Depending on the language you may also need to escape the slashes so they look like \/
\/release\/\d\.\d\.\d\.\d{3}\/
Although if your version numbers could ever contain double digits like the 23 in 1.23.4.555
you should consider adding some plus signs to require 1 or more digits between the dots.
\/release\/\d+\.\d+\.\d+\.\d{3}\/