I don't think grep allows you to search on a pattern and then only return part of the pattern.
One method--in SED--is to use a "backreference": This is a portion of a search pattern which is saved and then re-inserted later.
sed 's/part_of_pattern\(part_to_save\)more_pattern/\1/' filename
the output is simply "part_to_save", assuming that the whole pattern (between to first two "/"s) is matched.
For your example, try:
sed -n 's/.*\.\([^.]*\)$/\1/p' filename
Post back if you want it translated.....