﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Late Not Bad-文章分类-PHP</title><link>http://www.cppblog.com/lateCpp/category/15814.html</link><description>不带感情的学习技术</description><language>zh-cn</language><lastBuildDate>Sat, 01 Jan 2011 07:26:52 GMT</lastBuildDate><pubDate>Sat, 01 Jan 2011 07:26:52 GMT</pubDate><ttl>60</ttl><item><title>正则表达式中的 /isU 的解释</title><link>http://www.cppblog.com/lateCpp/articles/137813.html</link><dc:creator>lateCpp</dc:creator><author>lateCpp</author><pubDate>Fri, 31 Dec 2010 09:44:00 GMT</pubDate><guid>http://www.cppblog.com/lateCpp/articles/137813.html</guid><wfw:comment>http://www.cppblog.com/lateCpp/comments/137813.html</wfw:comment><comments>http://www.cppblog.com/lateCpp/articles/137813.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/lateCpp/comments/commentRss/137813.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/lateCpp/services/trackbacks/137813.html</trackback:ping><description><![CDATA[

<meta http-equiv="content-type" content="text/html; charset=utf-8"><span style="font-size: 9.72222px; "><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; "><meta http-equiv="content-type" content="text/html; charset=utf-8"><span style="font-style: normal; font-weight: normal; font-size: 9.72222px; "><h1 style="font-weight: bold; color: rgb(0, 0, 102); background-color: transparent; font-size: 18px; margin-top: 0px; ">Pattern Modifiers</h1><p class="para">The current possible PCRE modifiers are listed below. The names in parentheses refer to internal PCRE names for these modifiers. Spaces and newlines are ignored in modifiers, other characters cause error.</p></span></em></span></dt><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">i</em>&nbsp;(<em>PCRE_CASELESS</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">If this modifier is set, letters in the pattern match both upper and lower case letters.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">m</em>&nbsp;(<em>PCRE_MULTILINE</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">By default, PCRE treats the subject string as consisting of a single "line" of characters (even if it actually contains several newlines). The "start of line" metacharacter (^) matches only at the start of the string, while the "end of line" metacharacter ($) matches only at the end of the string, or before a terminating newline (unless&nbsp;<em class="emphasis" style="font-weight: bold; font-style: italic; ">D</em>&nbsp;modifier is set). This is the same as Perl.&nbsp;</span><span class="simpara">When this modifier is set, the "start of line" and "end of line" constructs match immediately following or immediately before any newline in the subject string, respectively, as well as at the very start and end. This is equivalent to Perl's /m modifier. If there are no "\n" characters in a subject string, or no occurrences of ^ or $ in a pattern, setting this modifier has no effect.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">s</em>&nbsp;(<em>PCRE_DOTALL</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">If this modifier is set, a dot metacharacter in the pattern matches all characters, including newlines. Without it, newlines are excluded. This modifier is equivalent to Perl's /s modifier. A negative class such as [^a] always matches a newline character, independent of the setting of this modifier.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">x</em>&nbsp;(<em>PCRE_EXTENDED</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">If this modifier is set, whitespace data characters in the pattern are totally ignored except when escaped or inside a character class, and characters between an unescaped # outside a character class and the next newline character, inclusive, are also ignored. This is equivalent to Perl's /x modifier, and makes it possible to include comments inside complicated patterns. Note, however, that this applies only to data characters. Whitespace characters may never appear within special character sequences in a pattern, for example within the sequence (?( which introduces a conditional subpattern.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">e</em>&nbsp;(<em>PREG_REPLACE_EVAL</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">If this modifier is set,&nbsp;<span class="function"><a href="http://www.php.net/manual/en/function.preg-replace.php" class="function" style="color: rgb(0, 0, 153); background-color: transparent; ">preg_replace()</a></span>&nbsp;does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string. Single quotes, double quotes, backslashes (<em>\</em>) and NULL chars will be escaped by backslashes in substituted backreferences.</span><p class="para">Only&nbsp;<span class="function"><a href="http://www.php.net/manual/en/function.preg-replace.php" class="function" style="color: rgb(0, 0, 153); background-color: transparent; ">preg_replace()</a></span>&nbsp;uses this modifier; it is ignored by other PCRE functions.</p></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">A</em>&nbsp;(<em>PCRE_ANCHORED</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">If this modifier is set, the pattern is forced to be "anchored", that is, it is constrained to match only at the start of the string which is being searched (the "subject string"). This effect can also be achieved by appropriate constructs in the pattern itself, which is the only way to do it in Perl.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">D</em>&nbsp;(<em>PCRE_DOLLAR_ENDONLY</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">If this modifier is set, a dollar metacharacter in the pattern matches only at the end of the subject string. Without this modifier, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This modifier is ignored if&nbsp;<em class="emphasis" style="font-weight: bold; font-style: italic; ">m</em>&nbsp;modifier is set. There is no equivalent to this modifier in Perl.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">S</em></span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">When a pattern is going to be used several times, it is worth spending more time analyzing it in order to speed up the time taken for matching. If this modifier is set, then this extra analysis is performed. At present, studying a pattern is useful only for non-anchored patterns that do not have a single fixed starting character.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">U</em>&nbsp;(<em>PCRE_UNGREEDY</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">This modifier inverts the "greediness" of the quantifiers so that they are not greedy by default, but become greedy if followed by&nbsp;<em>?</em>. It is not compatible with Perl. It can also be set by a (<em>?U</em>)&nbsp;<a href="http://www.php.net/manual/en/regexp.reference.internal-options.php" class="link" style="color: rgb(0, 0, 153); background-color: transparent; ">modifier setting within the pattern</a>&nbsp;or by a question mark behind a quantifier (e.g.&nbsp;<em>.*?</em>).</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">X</em>&nbsp;(<em>PCRE_EXTRA</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">This modifier turns on additional functionality of PCRE that is incompatible with Perl. Any backslash in a pattern that is followed by a letter that has no special meaning causes an error, thus reserving these combinations for future expansion. By default, as in Perl, a backslash followed by a letter with no special meaning is treated as a literal. There are at present no other features controlled by this modifier.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">J</em>&nbsp;(<em>PCRE_INFO_JCHANGED</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">The (?J) internal option setting changes the local&nbsp;<em>PCRE_DUPNAMES</em>&nbsp;option. Allow duplicate names for subpatterns.</span></dd><dt style="font-family: verdana, arial, helvetica, sans-serif; "><span class="term"><em class="emphasis" style="font-weight: bold; font-style: italic; ">u</em>&nbsp;(<em>PCRE8</em>)</span></dt><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">This modifier turns on additional functionality of PCRE that is incompatible with Perl. Pattern strings are treated as UTF-8. This modifier is available from PHP 4.1.0 or greater on Unix and from PHP 4.2.3 on win32. UTF-8 validity of the pattern is checked since PHP&nbsp;</span><span  style="font-size: 6.94444px; ">4.3.5.</span></dd><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span  style="font-size: 6.94444px; "><span style="FONT-SIZE: 14pt ">示例代码</span></span></dd><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara">&nbsp;</span></dd><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; "><font  color="#FF0000" face="Verdana, Helvetica, Arial, sans-serif"><span  style="line-height: 25px;"><div style="background-color: rgb(238, 238, 238); font-size: 13px; border-left-color: rgb(204, 204, 204); padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; "><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008080; ">&nbsp;1</span>&nbsp;<span style="color: #000000; ">&lt;?</span><span style="color: #000000; ">php&nbsp;&nbsp;<br></span><span style="color: #008080; ">&nbsp;2</span>&nbsp;<span style="color: #000000; "></span><span style="color: #0000FF; ">echo</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">&lt;pre&gt;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">;&nbsp;&nbsp;<br></span><span style="color: #008080; ">&nbsp;3</span>&nbsp;<span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">&nbsp;4</span>&nbsp;<span style="color: #000000; "></span><span style="color: #800080; ">$str</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">=</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">&lt;ul&gt;hello&nbsp;world&lt;li&gt;hi&lt;/li&gt;&lt;li&gt;hello&lt;/li&gt;&lt;/ul&gt;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">;&nbsp;&nbsp;<br></span><span style="color: #008080; ">&nbsp;5</span>&nbsp;<span style="color: #000000; "></span><span style="color: #800080; ">$pattern</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">=</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">~&lt;li&gt;.*&lt;/li&gt;~</span><span style="color: #000000; ">'</span><span style="color: #000000; ">;&nbsp;&nbsp;<br></span><span style="color: #008080; ">&nbsp;6</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">preg_match</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$pattern</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$str</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$matches</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">&nbsp;7</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">var_dump</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$matches</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">&nbsp;8</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008000; ">/*</span><span style="color: #008000; ">&nbsp;<br></span><span style="color: #008080; ">&nbsp;9</span>&nbsp;<span style="color: #008000; ">array(1)&nbsp;{&nbsp;<br></span><span style="color: #008080; ">10</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;[0]=&gt;&nbsp;<br></span><span style="color: #008080; ">11</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;string(25)&nbsp;"&lt;li&gt;hi&lt;/li&gt;&lt;li&gt;hello&lt;/li&gt;"&nbsp;<br></span><span style="color: #008080; ">12</span>&nbsp;<span style="color: #008000; ">}&nbsp;<br></span><span style="color: #008080; ">13</span>&nbsp;<span style="color: #008000; "></span><span style="color: #008000; ">*/</span><span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">14</span>&nbsp;<span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">15</span>&nbsp;<span style="color: #000000; "></span><span style="color: #800080; ">$pattern1</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">=</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">~&lt;li&gt;.*?&lt;/li&gt;~</span><span style="color: #000000; ">'</span><span style="color: #000000; ">;&nbsp;&nbsp;<br></span><span style="color: #008080; ">16</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">preg_match</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$pattern1</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$str</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$matches1</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">17</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">var_dump</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$matches1</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">18</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008000; ">/*</span><span style="color: #008000; ">&nbsp;<br></span><span style="color: #008080; ">19</span>&nbsp;<span style="color: #008000; ">array(1)&nbsp;{&nbsp;<br></span><span style="color: #008080; ">20</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;[0]=&gt;&nbsp;<br></span><span style="color: #008080; ">21</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;string(11)&nbsp;"&lt;li&gt;hi&lt;/li&gt;"&nbsp;<br></span><span style="color: #008080; ">22</span>&nbsp;<span style="color: #008000; ">}&nbsp;<br></span><span style="color: #008080; ">23</span>&nbsp;<span style="color: #008000; "></span><span style="color: #008000; ">*/</span><span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">24</span>&nbsp;<span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">25</span>&nbsp;<span style="color: #000000; "></span><span style="color: #800080; ">$pattern2</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">=</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">~&lt;li&gt;.*&lt;/li&gt;~U</span><span style="color: #000000; ">'</span><span style="color: #000000; ">;&nbsp;&nbsp;<br></span><span style="color: #008080; ">26</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">preg_match</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$pattern2</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$str</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$matches2</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">27</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">var_dump</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$matches2</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">28</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008000; ">/*</span><span style="color: #008000; ">&nbsp;<br></span><span style="color: #008080; ">29</span>&nbsp;<span style="color: #008000; ">array(1)&nbsp;{&nbsp;<br></span><span style="color: #008080; ">30</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;[0]=&gt;&nbsp;<br></span><span style="color: #008080; ">31</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;string(11)&nbsp;"&lt;li&gt;hi&lt;/li&gt;"&nbsp;<br></span><span style="color: #008080; ">32</span>&nbsp;<span style="color: #008000; ">}&nbsp;<br></span><span style="color: #008080; ">33</span>&nbsp;<span style="color: #008000; "></span><span style="color: #008000; ">*/</span><span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">34</span>&nbsp;<span style="color: #000000; ">&nbsp;<br></span><span style="color: #008080; ">35</span>&nbsp;<span style="color: #000000; "></span><span style="color: #800080; ">$pattern3</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">=</span><span style="color: #000000; ">&nbsp;</span><span style="color: #000000; ">'</span><span style="color: #000000; ">~&lt;li&gt;.*?&lt;/li&gt;~U</span><span style="color: #000000; ">'</span><span style="color: #000000; ">;&nbsp;&nbsp;<br></span><span style="color: #008080; ">36</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">preg_match</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$pattern3</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$str</span><span style="color: #000000; ">,</span><span style="color: #800080; ">$matches3</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">37</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008080; ">var_dump</span><span style="color: #000000; ">(</span><span style="color: #800080; ">$matches3</span><span style="color: #000000; ">);&nbsp;&nbsp;<br></span><span style="color: #008080; ">38</span>&nbsp;<span style="color: #000000; "></span><span style="color: #008000; ">/*</span><span style="color: #008000; ">&nbsp;<br></span><span style="color: #008080; ">39</span>&nbsp;<span style="color: #008000; ">array(1)&nbsp;{&nbsp;<br></span><span style="color: #008080; ">40</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;[0]=&gt;&nbsp;<br></span><span style="color: #008080; ">41</span>&nbsp;<span style="color: #008000; ">&nbsp;&nbsp;string(25)&nbsp;"&lt;li&gt;hi&lt;/li&gt;&lt;li&gt;hello&lt;/li&gt;"&nbsp;<br></span><span style="color: #008080; ">42</span>&nbsp;<span style="color: #008000; ">}&nbsp;<br></span><span style="color: #008080; ">43</span>&nbsp;<span style="color: #008000; "></span><span style="color: #008000; ">*/</span></div><div style="background-color: rgb(238, 238, 238); font-size: 13px; border-left-color: rgb(204, 204, 204); padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; "><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #008080; ">&nbsp;</span></div><br></span></font></dd><dd style="margin-top: 0.5em; margin-right: 0px; margin-bottom: 0.5em; margin-left: 2em; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; font-family: verdana, arial, helvetica, sans-serif; "><span class="simpara"><meta http-equiv="content-type" content="text/html; charset=utf-8"><span style="color: rgb(255, 0, 0); font-family: Verdana, Helvetica, Arial, sans-serif; line-height: 25px; font-size: 9.72222px; ">事实证明，加了U，原来是贪婪匹配的变成非贪婪匹 配，非贪婪匹配的却变成了贪婪匹配。</span></span></dd></span><img src ="http://www.cppblog.com/lateCpp/aggbug/137813.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/lateCpp/" target="_blank">lateCpp</a> 2010-12-31 17:44 <a href="http://www.cppblog.com/lateCpp/articles/137813.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>