You could use cut:
echo "tog-pegasus-2.12.1-16.el7.x86_64" | cut -d . -f 3 | cut -d - -f 1
This takes the third field, considering that . is the field delimiters, so you get the micro version including the -patchlevel; then it takes the first field, considering that - is the field delimiter, and then you are left with the micro version only.