import re


def set_agvcpkg_portfile_version_number(portfile_text, new_version_string):
    """
    Update the version number of the portfile
    """
    return re.sub(pattern=r"REF ([0-9]+\.[0-9]+\.[0-9]+)", repl="REF " + new_version_string, string=portfile_text)