这应该这样做:
(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[^a-zA-Z]).{8,}
见:rubular
解释:
(?=.*?[a-z]) //lookahead,there has to be a lower case alphabetic char (?=.*?[A-Z]) //lookahead,there has to be a upper case alphabetic char (?=.*?[^a-zA-Z]) //lookahead,there has to be a non-alphabetic char .{8,} // any character at least 8 times