import re


def get_first_number(input_string, as_string=False):
    """
    Returns the first number of the given string
    :param input_string: str
    :param as_string: bool, Whether the found number should be returned as integer or as string
    :return: variant, str || int
    """

    found = re.search('[0-9]+', input_string)
    if not found:
        return None

    number_str = found.group()
    if not number_str:
        return None

    if as_string:
        return number_str
    number = int(number_str)

    return number