<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>翱翔白鹭正则</title>
	<atom:link href="http://yanglu.org/tag/regular/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanglu.org</link>
	<description>天高任鸟飞，海阔凭鱼跃！</description>
	<lastBuildDate>Wed, 23 Nov 2011 06:04:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>php正则匹配中文</title>
		<link>http://yanglu.org/php_preg_match_chinese/</link>
		<comments>http://yanglu.org/php_preg_match_chinese/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 00:44:39 +0000</pubDate>
		<dc:creator>yanglu</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://yanglu.org/?p=300</guid>
		<description><![CDATA[php正则匹配中文的方法： $str = &#34;04aol汉字&#34;; $pattern = &#34;/^(\d{2})([A-Za-z]{3})([&#34;.chr&#40;0xa1&#41;.&#34;-&#34;.chr&#40;0xff&#41;.&#34;]+)$/&#34;; if&#40;preg_match&#40;$pattern, $str, $tmp&#41;&#41; &#123; 　　var_export&#40;$tmp&#41;; &#125; 显示结果： array &#40; 　　0 =&#62; '04aol汉字', 　　1 =&#62; '04', 　　2 =&#62; 'aol', 　　3 =&#62; '汉字', &#41; By the time your rss reader get this post here is 2 comments ,Welcome you come to leave your opinion !]]></description>
			<content:encoded><![CDATA[<p>php正则匹配中文的方法：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$str</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;04aol汉字&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^(\d{2})([A-Za-z]{3})([&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0xa1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #208080;">0xff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;]+)$/&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span> <span style="color: #000088;">$str</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tmp</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
　　<span style="color: #990000;">var_export</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>显示结果：</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">array</span> <span style="color: #009900;">&#40;</span>
　　<span style="color: #cc66cc;">0</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'04aol汉字'</span><span style="color: #339933;">,</span>
　　<span style="color: #cc66cc;">1</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'04'</span><span style="color: #339933;">,</span>
　　<span style="color: #cc66cc;">2</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'aol'</span><span style="color: #339933;">,</span>
　　<span style="color: #cc66cc;">3</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'汉字'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span></pre></div></div>

By the time  your rss reader get this post here is <strong> 2 </strong>comments ,Welcome you come to leave your opinion !]]></content:encoded>
			<wfw:commentRss>http://yanglu.org/php_preg_match_chinese/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

