def findfirstnumberpos(s):
    """
    return position in string where the first digit lies and number of digits found

    pattern12345.cor
    => 7
    pattern_0005.cor
    => 8
    """
    if '.' in s:
        splits = s.split('.')
        if len(splits) != 2:
            raise ValueError("%s must contain a single '.'!" % s)
        beforedot = splits[-2]
    else:
        beforedot = s
    l = len(beforedot)
    for _k, elem in enumerate(beforedot[::-1]):
        if elem not in '0123456789':
            break
    nbdigits_found = _k
    indexpos_first_digit = l - _k
    return indexpos_first_digit, nbdigits_found
