Conditional expressions help qualify and restrict regex searches, increasing the probability of a desirable match. The vertical bar "|" symbol, meaning "OR", places a condition on the regex to search for either one character in a string or another. Because the regex has a list of alternate choices to evaluate, this regex technique is called "alternation". To search for either one character or another, insert a vertical bar "|" between the desired characters.
Example 1: Use "|" to alternate a search for various spellings of a string.
gray|grey
gray grey
GREY Gray
Example 2: Use "|" to alternate a search for either email or Email or EMAIL or e-mail.
email|Email|EMAIL|e-mail
email Email EMAIL e-mail
EmAiL E-Mail