import re
strings = [
    r"C:\Photos\Selfies\1|",
    r"C:\HDPhotos\Landscapes\2|",
    r"C:\Filters\Pics\12345678|",
    r"C:\Filters\Pics2\00000000|",
    r"C:\Filters\Pics2\00000000|XAV7"
    ]
    
for string in strings:
    matchptrn = re.match(r"(?!.*\\\d{8}\|$)(?P<file_path>.*)\|(?P<suffix>.*)", string)
    if matchptrn:
        print("FILE PATH = {}, SUFFIX = {}".format(*matchptrn.groups()))
        