@H.PWiz Okay so clearly with the kind of optimizations you've found, it'll be later that the more generalized approach wins, so I generated it up to a higher point:
^(?=(x*)\1(x()|))\2(x+(|)|\3).*(?=\1$)(?4)
^(?=(x*)\1\1(x())?(x())?)((?=\1(x*))(x+(||)|\3|\5).*(?=\7$)){3}
^(?=(x*)\1{3}(xx())?(x())?)((?=\1(x*))(x+(|||)|\3(|)|\5).*(?=\7$)){4}
^(?=(x*)\1{4}(xx())?(x())?(x())?)((?=\1(x*))(x+(||||)|\3(|)|\5|\7).*(?=\9$)){5}
^(?=(x*)\1{5}(xx())?(xx())?(x())?)((?=\1(x*))(x+(|||||)|(\3|\5)(|)|\7).*(?=\9$)){6}