The intersection operation on character classes results in a composite class that contains every character allowed by all of its operand (inner) classes or, in other words, matches characters that belong to all the character classes in the composite character class pattern. The intersection operator is as follows:
For example, consider the following composite character class using the && operator:
This matches any character that is in the range of A to Z and is one of the single P, Q, or R characters. However, the preceding regular expression can also be simply written as follows:
The following composite character class using intersection matches the digits, 5 and 6, since ...