in reply to Re^5: RegEx Question
in thread RegEx Question

Well, whichever lookahead is placed last doesn't need to be a lookahead, and the order doesn't matter as far as the result is concerned, so I could have written the pattern as follows:
/ ^ (?=.*0) (?=.*1) (?=.*2) (?=.*3) (?=.*4) (?=.*5) (?=.*6) (?=.*7) (?=.*8) .{9}\z /sx;

I figured it would be faster to check the length and for the presence of invalid characters first, and I left the last one as a lookahead for symmetry.

Note that this is basically the trick for doing "and" in regex matches. My original solution is roughly the same as

/^[0-8]{9}\z/ && /0/ && /1/ && /2/ && /3/ && /4/ && /5/ && /6/ && /7/ && /8/