See here for the original answer.
I modified your regex to match the package naming convention, you can see a working example here:
((.*)\.\d+\.\d+\.\d+-\d+)\.x86_64\.rpm