All I need to do is extract the versioning information from the following file:
my_archive_1.1.1.201_x86_64.tgz
I am trying to extract both the version number which is 1.1.1 and the release number which is 201. Normally I use python for these purposes, but I have been asked not to. How do I do it by just using bash? The filename will always be of the form
([A-Za-z_]+)_([0-9]+\.[0-9]+\.[0-9]+)\.([0-9]+)_x86_64\.tgz
The groups are in parenthesis. I need the second and third groups if you start counting from 1.