Source of: /manual/en/regexp.reference.verticalbar.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/reference.pcre.pattern.syntax.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'regexp.reference.verticalbar.php',
1 => 'Vertical bar',
),
'up' =>
array (
0 => 'reference.pcre.pattern.syntax.php',
1 => 'Pattern Syntax',
),
'prev' =>
array (
0 => 'regexp.reference.squarebrackets.php',
1 => 'Square brackets',
),
'next' =>
array (
0 => 'regexp.reference.internal-options.php',
1 => 'Internal option setting',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="regexp.reference.verticalbar" class="section">
<h2 class="title">Vertical bar</h2>
<p class="para">
Vertical bar characters are used to separate alternative
patterns. For example, the pattern
<i>gilbert|sullivan</i>
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.
</p>
</div><?php manual_footer(); ?>