import re


def readstfm(string):
    """
    Read numbers written in standard form: 0.01(2), return value and error
    Read numbers from string with form 0.01(2), returns floats 0.01 and 0.02
    Errors and values will return 0 if not given.

    E.G.
    readstfm('0.01(2)') = (0.01, 0.02)
    readstfm('1000(300)') = (1000.,300.)
    readstfm('1.23(3)E4') = (12300.0, 300.0)
    """

    values = re.findall('[-0-9.]+|\([-0-9.]+\)', string)
    if len(values) > 0 and '(' not in values[0] and values[0] != '.':
        value = values[0]
    else:
        value = '0'

    # Determine number of decimal places for error
    idx = value.find('.')  # returns -1 if . not found
    if idx > -1:
        pp = idx - len(value) + 1
    else:
        pp = 0
    value = float(value)

    error = re.findall('\([-0-9.]+\)', string)
    if len(error) > 0:
        error = abs(float(error[0].strip('()')))
        error = error * 10 ** pp
    else:
        error = 0.

    power = re.findall('(?:[eE]|x10\^|\*10\^|\*10\*\*)([+-]?\d*\.?\d+)', string)
    if len(power) > 0:
        power = float(power[0])
        value = value * 10 ** power
        error = error * 10 ** power
    return value, error