How to write character class intersection regex?
You can use the
&& operator to combine classes that define sets of characters. It will only match characters common to both classes (intersection).
The program print the following result:
Text "c" found at 7 to 8.
Text "t" found at 31 to 32.
Text "a" found at 36 to 37.