You can group sub-expressions and offer them as alternatives. For example, you might want to match "AB" or "CD". The alternation operator can be placed between each sub-expression to indicate choices like this:
This technique can be used in combinations with character literals, classes and repetition operators. Like this:
This matches with three lower case letters or 40 numeric digits and nothing else will match.
ECMA 262 edition 3 - section - 15.10.1
ECMA 262 edition 3 - section - 184.108.40.206
ECMA 262 edition 3 - section - 220.127.116.11