<?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>5d0d.net - 我的领地 &#187; 正则</title>
	<atom:link href="http://5d0d.net/tag/%e6%ad%a3%e5%88%99/feed/" rel="self" type="application/rss+xml" />
	<link>http://5d0d.net</link>
	<description>WPMU,Drupal,Google,建站笔记,软件经验</description>
	<lastBuildDate>Tue, 27 Jul 2010 05:54:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>删除帖子中的垃圾链接</title>
		<link>http://5d0d.net/2009/12/14/%e5%88%a0%e9%99%a4%e5%b8%96%e5%ad%90%e4%b8%ad%e7%9a%84%e5%9e%83%e5%9c%be%e9%93%be%e6%8e%a5/</link>
		<comments>http://5d0d.net/2009/12/14/%e5%88%a0%e9%99%a4%e5%b8%96%e5%ad%90%e4%b8%ad%e7%9a%84%e5%9e%83%e5%9c%be%e9%93%be%e6%8e%a5/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 19:25:51 +0000</pubDate>
		<dc:creator>鱼无言</dc:creator>
				<category><![CDATA[建站相关]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://5d0d.net/2009/12/14/%e5%88%a0%e9%99%a4%e5%b8%96%e5%ad%90%e4%b8%ad%e7%9a%84%e5%9e%83%e5%9c%be%e9%93%be%e6%8e%a5/</guid>
		<description><![CDATA[为这摆弄了一天，只当学习正则表达式了。
演示地址：http://id74.cn/show.php?tid=99
&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#62;     &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;      &#60;head&#62;      &#160; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html;charset=utf-8&#34; /&#62;      &#160; &#60;title&#62;去除垃圾链接&#60;/title&#62;      &#160; &#60;meta name=&#34;author&#34; content=&#34;我的领地-http://5d0d.net&#34; /&#62;      &#160; &#60;meta name=&#34;keywords&#34; [...]]]></description>
		<wfw:commentRss>http://5d0d.net/2009/12/14/%e5%88%a0%e9%99%a4%e5%b8%96%e5%ad%90%e4%b8%ad%e7%9a%84%e5%9e%83%e5%9c%be%e9%93%be%e6%8e%a5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>常用正则表达式[转]</title>
		<link>http://5d0d.net/2009/12/14/%e5%b8%b8%e7%94%a8%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e8%bd%ac/</link>
		<comments>http://5d0d.net/2009/12/14/%e5%b8%b8%e7%94%a8%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e8%bd%ac/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 19:19:01 +0000</pubDate>
		<dc:creator>鱼无言</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://5d0d.net/2009/12/14/%e5%b8%b8%e7%94%a8%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e8%bd%ac/</guid>
		<description><![CDATA[匹配中文字符的正则表达式： [u4e00-u9fa5]   评注：匹配中文还真是个头疼的事，有了这个表达式就好办了    匹配双字节字符(包括汉字在内)：[^x00-xff]    评注：可以用来计算字符串的长度（一个双字节字符长度计2，ASCII字符计1）    匹配空白行的正则表达式：ns*r    评注：可以用来删除空白行    匹配HTML标记的正则表达式：&#60;(S*?)[^&#62;]*&#62;.*?&#124;&#60;.*? /&#62;    评注：网上流传的版本太糟糕，上面这个也仅仅能匹配部分，对于复杂的嵌套标记依旧无能为力    匹配首尾空白字符的正则表达式：^s*&#124;s*$    评注：可以用来删除行首行尾的空白字符(包括空格、制表符、换页符等等)，非常有用的表达式    匹配Email地址的正则表达式：w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*    评注：表单验证时很实用    匹配网址URL的正则表达式：[a-zA-z]+://[^s]*    评注：网上流传的版本功能很有限，上面这个基本可以满足需求  [...]]]></description>
		<wfw:commentRss>http://5d0d.net/2009/12/14/%e5%b8%b8%e7%94%a8%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e8%bd%ac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>正则表达式速查</title>
		<link>http://5d0d.net/2009/12/13/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e9%80%9f%e6%9f%a5/</link>
		<comments>http://5d0d.net/2009/12/13/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e9%80%9f%e6%9f%a5/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 14:16:06 +0000</pubDate>
		<dc:creator>鱼无言</dc:creator>
				<category><![CDATA[学习笔记]]></category>
		<category><![CDATA[正则]]></category>

		<guid isPermaLink="false">http://5d0d.net/2009/12/13/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e9%80%9f%e6%9f%a5/</guid>
		<description><![CDATA[3. 正则表达式定义
 正则表达式(regular expression)描述了一种字符串匹配的模式，可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。
l 列目录时， dir *.txt或ls *.txt中的*.txt就不是一个正则表达式,因为这里*与正则式的*的含义是不同的。
 正则表达式是由普通字符（例如字符 a 到 z）以及特殊字符（称为元字符）组成的文字模式。正则表达式作为一个模板，将某个字符模式与所搜索的字符串进行匹配。
&#160;
3.1 普通字符
 由所有那些未显式指定为元字符的打印和非打印字符组成。这包括所有的大写和小写字母字符，所有数字，所有标点符号以及一些符号。 
3.2 非打印字符





字符 


含义




\cx 


匹配由x指明的控制字符。例如， \cM 匹配一个 Control-M 或回车符。x 的值必须为 A-Z 或 a-z 之一。否则，将 c 视为一个原义的 &#8216;c&#8217; 字符。




\f 


匹配一个换页符。等价于 \x0c 和 \cL。




\n 


匹配一个换行符。等价于 \x0a 和 \cJ。




\r 


匹配一个回车符。等价于 \x0d 和 \cM。




\s 


匹配任何空白字符，包括空格、制表符、换页符等等。等价于 [ \f\n\r\t\v]。




\S 


匹配任何非空白字符。等价于 [^ \f\n\r\t\v]。




\t 


匹配一个制表符。等价于 \x09 和 \cI。




\v 


匹配一个垂直制表符。等价于 \x0b [...]]]></description>
		<wfw:commentRss>http://5d0d.net/2009/12/13/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e9%80%9f%e6%9f%a5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
