>>> import re
>>> re.sub(r'(\d+) (gigs|gigabytes|gbs)', r'\1 gigabytes', str)
for multiple substitutions, the trick is to use a callable (in this case a lambda function) as replacement:
>>> gb='gigabytes'
>>> mb='megabytes'
>>> subs={'gigs': gb, 'gigabytes': gb, 'gbs': gb, 'mbs': mb, ...}
>>> str='there are 2048 mbs in 2 gigs'
>>> re.sub(r'(\d+) ({})'.format('|'.join(subs.keys())), \
lambda x: '{} {}'.format(x.group(1), subs[x.group(2)]), str)
'there are 2048 megabytes in 2 gigabytes'