Yes indeed. Normally there won't be any other number but I'm foreseeing the case where you could have :
Thank you, it almost works but I still have an issue.
EDIT: please see next post for actual issue
when I do :
>echo myzip123file[has_some_numbers7]in_its_filename.zip | sed -r "s|^.[^0-9]*([0-9]+)(.[^0-9]*.*)|\1|"
I get the right value.
but when I try within the real batch :
>echo %1 | sed -r "s|^.[^0-9]*([0-9]+)(.[^0-9]*.*)|\1|"
I get a missing argument error. I'm pretty sure it's because I'm not using the right syntax for the argument. What should I change? Shall I use %~n1 instead? (couldn't try yesterday and now I'm at work)