<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Grouping</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="parle.regex.anchors.html">Anchors</a></div> <div class="next" style="text-align: right; float: right;"><a href="parle.examples.html">Examples</a></div> <div class="up"><a href="parle.pattern.matching.html">Pattern matching</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="parle.regex.grouping" class="section"> <h2 class="title">Grouping</h2> <p class="para"> <table class="doctable table"> <caption><strong>Grouping</strong></caption> <thead> <tr> <th>Sequence</th><th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>(...)</td><td>Group a regular expression to override default operator precedence.</td> </tr> <tr> <td style="vertical-align: top;">(?r-s:pattern)</td> <td> Apply option r and omit option s while interpreting pattern. Options may be zero or more of the characters i, s, or x. <table class="doctable table"> <caption><strong>Options</strong></caption> <thead> <tr> <th>Option</th><th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>i</td><td>Case insensitive.</td> </tr> <tr> <td>-i</td><td>Case sensitive.</td> </tr> <tr> <td>s</td><td>Alters the meaning of '.' to match any character whatsoever.</td> </tr> <tr> <td>-s</td><td>"lters the meaning of '.' to match any character except '\n'.</td> </tr> <tr> <td>x</td><td>Ignores comments and whitespace in patterns. Whitespace is ignored unless it is backslash-escaped, contained within ""s, or appears inside a character range.</td> </tr> </tbody> </table> These options can be applied globally at the rules level by passing a combination of the bit flags to the lexer. </td> </tr> <tr> <td>(?# comment )</td><td>Omit everything within (). The first ) character encountered ends the pattern. It is not possible for the comment to contain a ) character. The comment may span lines.</td> </tr> </tbody> </table> </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="parle.regex.anchors.html">Anchors</a></div> <div class="next" style="text-align: right; float: right;"><a href="parle.examples.html">Examples</a></div> <div class="up"><a href="parle.pattern.matching.html">Pattern matching</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>