regex = re.compile(
    """
    -?    
   (?:    
    \\d+   
    ()    
   )?     
   (?:    
    \\.\\d* 
    ()    
   )?     
   (?:    
    e     
    -?    
    \\d+   
    ()    
   )?     
  (?:     
   \\2     
  |       
   \\1\\3   
  )"""
    , re.I | re.X)
Regex for Matching a Floating Point Number which is not an Integer