You are looking for:
r'(?<=\d|\.)-(?=\d)'
which matches a - if there are digits or a dot) before, and digits after.
Demo:
>>> exponent = re.compile(r'(?<=\d|\.)-(?=\d)')
>>> exponent.sub('e-', '0.1245-102')
'0.1245e-102'
>>> float(exponent.sub('e-', '0.1245-102'))
1.245e-103
>>> float(exponent.sub('e-', '1-10'))
1e-10
>>> float(exponent.sub('e-', '1.-10'))
1e-10
>>> float(exponent.sub('e-', '-1-10'))
-1e-10
To handle both - and D+ (negative and positive exponents), you could use:
r'(?<=\d|\.)D?(?=(?:\+|-)\d)
which would allow for and replace an optional D, leaving the - or + in place when replacing:
>>> exponent = re.compile(r'(?<=\d|\.)D?(?=(?:\+|-)\d)')
>>> float(exponent.sub('e', '0.1245-102'))
1.245e-103
>>> float(exponent.sub('e', '456D+5'))
45600000.0
This does allow for the D to also precede the -, so 0.1245D-102 would be valid too, but it simplifies the replacement handling.
'0.1245-102'.replace('-', 'e-')?1-10,1.-10,-1-10-- I think the accepted solution should handle these just in case ...1E10?1+10?