Then it matches any number of substrings which can either be a sequence of non - parentheses, or a recursive match of the pattern itselfThen it matches any number of substrings which can either be a sequence of non - parentheses, or a recursive match of the pattern itself (i.e. a correctly parenthesized substring).
Vertical bar characters are used to separate alternative patterns. For example, the pattern gilbert_BAR_sullivan matches either "gilbert" or "sullivan". Any number of alternatives may appear, and an empty alternative is permitted (matching the empty string). The matching process tries each alternative in turn, from left to right, and the first one that succeeds is used. If the alternatives are within a subpattern (defined below), "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern.