regex = (
    """^(?:(?:[a-z\\d\\-]{1,100}\\~)?(?:(?!\\-)[a-z\\d\\-\\.]{1,100}:)?(?!-)[a-z\\d\\-]{0,99}[a-z\\d])$"""
    )
print(re.match(regex, 'HelloWorld'))
Cannot run Hello World on Google App Engine Windows