import re


def is_base_path_gitlab_api(url):
    """
    DETERMINE INTENT TO USE GITLAB FROM BASE PATH OF URL
    should be of the following form:
    http://192.168.85.62/api/{api_version}/projects/{project_id}/repository/files/{file_path}/raw?ref={git branch}
    ex input - http://192.168.85.62/api/v4/projects/4/repository/files/hello_world.sh/raw?ref=master
    :param str url: the user input url
    """
    base_path_pattern = "api/v\d/projects/\d+/repository/files"
    matching = re.search(base_path_pattern, url)
    if not matching:
        return False
    return True