?!s*;p* /b /flatthe help file states: "Run a filtered branch view excluding any branches starting with s* OR with p*." Nope, it doesn't work that way.
?*.txt or ("week1" and attr:d) or ("week2" and attr:d)lists folders not only week1 or week2. By rephrasing it to
?*.txt or ((week1 or week2) and attr:d)works. XY assumes Week2 is an attr: instead of name: in the example.