                     if si == address.endIndex && remainder < pattern.endIndex {
                         return false
                     }
+                    // step back
+                    si = address.index(before: si)
                 } else { // skip to next comma
                     si = place
                     while pi < pattern.endIndex && pattern[pi] != "," && pattern[pi] != "}" {

// true
print(matches(address:"ablak", pattern:"a{blak,jto}"))

// crash!
print(matches(address:"ablak", pattern:"a{blak|jto}"))


                return false
            }
            
            // step back
            remainder = pattern.index(after:remainder)

            
