mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
189 lines
5.3 KiB
HTML
189 lines
5.3 KiB
HTML
<!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>Set/Get the default options for mbregex functions</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.mb-regex-set-options" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">mb_regex_set_options</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.3.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">mb_regex_set_options</span> — <span class="dc-title">Set/Get the default options for mbregex functions</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.mb-regex-set-options-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>mb_regex_set_options</strong></span>
|
|
([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$options</code><span class="initializer"> = mb_regex_set_options()</span></span>
|
|
] ) : <span class="type">string</span></div>
|
|
|
|
<p class="simpara">
|
|
Sets the default options described by <code class="parameter">options</code>
|
|
for multibyte regex functions.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.mb-regex-set-options-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">options</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
The options to set. This is a string where each
|
|
character is an option. To set a mode, the mode
|
|
character must be the last one set, however there
|
|
can only be set one mode but multiple options.
|
|
</p>
|
|
|
|
<table class="doctable table">
|
|
<caption><strong>Regex options</strong></caption>
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>Option</th>
|
|
<th>Meaning</th>
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="tbody">
|
|
<tr>
|
|
<td>i</td>
|
|
<td>Ambiguity match on</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>x</td>
|
|
<td>Enables extended pattern form</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>m</td>
|
|
<td><em>'.'</em> matches with newlines</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>s</td>
|
|
<td><em>'^'</em> -> <em>'\A'</em>, <em>'$'</em> -> <em>'\Z'</em></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>p</td>
|
|
<td>Same as both the <em>m</em> and <em>s</em> options</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>l</td>
|
|
<td>Finds longest matches</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>n</td>
|
|
<td>Ignores empty matches</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>e</td>
|
|
<td><span class="function"><a href="eval.html" class="function">eval()</a></span> resulting code</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<table class="doctable table">
|
|
<caption><strong>Regex syntax modes</strong></caption>
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>Mode</th>
|
|
<th>Meaning</th>
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody class="tbody">
|
|
<tr>
|
|
<td>j</td>
|
|
<td>Java (Sun java.util.regex)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>u</td>
|
|
<td>GNU regex</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>g</td>
|
|
<td>grep</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>c</td>
|
|
<td>Emacs</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>r</td>
|
|
<td>Ruby</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>z</td>
|
|
<td>Perl</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>b</td>
|
|
<td>POSIX Basic regex</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>d</td>
|
|
<td>POSIX Extended regex</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.mb-regex-set-options-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
The previous options. If <code class="parameter">options</code> is omitted,
|
|
it returns the <span class="type"><a href="language.types.string.html" class="type string">string</a></span> that describes the current options.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.mb-regex-set-options-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="mb_split.html" class="function" rel="rdfs-seeAlso">mb_split()</a> - 使用正则表达式分割多字节字符串</span></li>
|
|
<li class="member"><span class="function"><a href="mb_ereg.html" class="function" rel="rdfs-seeAlso">mb_ereg()</a> - Regular expression match with multibyte support</span></li>
|
|
<li class="member"><span class="function"><a href="mb_eregi.html" class="function" rel="rdfs-seeAlso">mb_eregi()</a> - Regular expression match ignoring case with multibyte support</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |