def segment_path(dot_path):
    """  a function to separate the path segments in a dot_path key

    :param dot_path: string with dot path syntax
    :return: list of string segments of path
    """
    import re
    digit_pat = re.compile('\\[(\\d+)\\]')
    key_list = dot_path.split('.')
    segment_list = []
    for key in key_list:
        if key:
            item_list = digit_pat.split(key)
            for item in item_list:
                if item:
                    segment_list.append(item)
    return segment_list
