How can i parse the string below to extract version number and release number from the filename string below.
program-product_3.0.1009-5-XY1.0.456-1_i386.deb
Here I'm interested in getting
Version number : 3.0.1009
Release number : 5
I tried grep, awk and sed and I`m not able to get it quite right.
The string follows the pattern,
Filename_Version-Release-OtherDependentPackageNameAndVersion-Release_Arch.deb.
Please note that the naming convention is out of my control.