Improved complex number parsing from string