Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
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.aspx – Ben Brammer Jun 9 at 21:21

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}\/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.