How to use logical OR operator in regex?
You can use the
| operator (logical OR) to match characters or expression of either the left or right of the
| operator. For example the
[t|T] will match either
T from the input string.
The program print the following result:
Text "T" found at 0 to 1.
Text "t" found at 31 to 32.