mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-17 21:16:57 +08:00
96 lines
3.7 KiB
HTML
96 lines
3.7 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>产生用于不区分大小的匹配的正则表达式</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.sql-regcase" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">sql_regcase</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">sql_regcase</span> — <span class="dc-title">产生用于不区分大小的匹配的正则表达式</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.sql-regcase-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>sql_regcase</strong></span>
|
|
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$string</code></span>
|
|
) : <span class="type">string</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
产生用于不区分大小的匹配的正则表达式
|
|
</p>
|
|
<div class="warning"><strong class="warning">Warning</strong><p class="simpara">自 PHP 5.3.0
|
|
起,已经<em class="emphasis">废弃</em>此函数。强烈建议不要应用此函数 。</p></div>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.sql-regcase-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">string</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
输入的字符。
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.sql-regcase-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
返回与 <code class="parameter">string</code>
|
|
相匹配的正则表达式,不论大小写字母。返回的表达式是将
|
|
<code class="parameter">string</code>
|
|
中的每个字母字符转换为方括号表达式,该方括号表达式包含了该字母的大小写形式。其它字符保留不变。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.sql-regcase-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-5890">
|
|
<p><strong>Example #1 <span class="function"><strong>sql_regcase()</strong></span> 例子</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">sql_regcase</span><span style="color: #007700">(</span><span style="color: #DD0000">"Foo - bar."</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
<div class="example-contents"><p>以上例程会输出:</p></div>
|
|
<div class="example-contents screen">
|
|
<div class="cdata"><pre>
|
|
[Ff][Oo][Oo] - [Bb][Aa][Rr].
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
<p class="para">
|
|
可以用于在仅支持区分大小写正则表达式的产品中完成不区分大小写的模式匹配。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 notes" id="refsect1-function.sql-regcase-notes">
|
|
<h3 class="title">注释</h3>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>: <p class="para">在 PHP 5.3.0
|
|
中,已放弃使用 regex 扩展而建议使用 <a href="book.pcre.html" class="link">PCRE 扩展</a>。调用此函数将会发出
|
|
<strong><code>E_DEPRECATED</code></strong> 通知。参见“<a href="reference.pcre.pattern.posix.html" class="link">差异列表</a>”可帮助你转为使用 PCRE。</p></p></blockquote>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |