import re


def _string_to_int(string: str) -> int:
    """
    a helper function convert from string to int, like S1 -> 1

    Args: 
        string (str): input string

    Returns:
        (int): return value if this is a int, return 0 if this is not a int 
    """
    r = re.findall('\d+', string)
    if (len(r) > 0):
        return int(r[0])
    else:
        return 0