July 2017
Intermediate to advanced
158 pages
3h 41m
English
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:
[A-Z&&[PQR]]
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:
[PQR]
The following composite character class using intersection matches the digits, 5 and 6, since ...
Read now
Unlock full access