If you use
find pool -regextype posix-extended \
-regex ".*/mypackage-([a-zA-Z0-9.]+-[0-9]{1,2})-x86_64\.pkg\.tar\.xz" \
-exec printf '%f\n' {} + | \
egrep grep -oEo '([a'[a-zA-Z0-9.]+-[0-9]{1,2})'
(assuming GNU grep as well), it should work for any path. The regex doesn't allow for any newlines, so there's no way to make it match for example a directory containing a similar name.