def get_value(dir, parm):
    return map(float, [t[len(parm):] for t in dir.split('_') if t.
        startswith(parm)])
get_value('a1.8000_b1.0000_cc1.3000_al0.209_be0.209_c1.344_e0.999', 'be')
How to match beginning of string or character in Python