If there is a request for an exception like this one: https://pagure.io/releng/fedora-scm-requests/issue/74637
^\S+(\D|\d_)(\d+\.)*\d+$
re.sub(r'_?(\d+\.)*\d+$', '', pkgname)
Such a request could then be approved by the bot.