<?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>ZFreet . CHeung &#187; 正式表达式</title>
	<atom:link href="http://www.zfreet.com/post/tag/%e6%ad%a3%e5%bc%8f%e8%a1%a8%e8%be%be%e5%bc%8f/feed" rel="self" type="application/rss+xml" />
	<link>http://www.zfreet.com</link>
	<description>我在“门”缝里 望着互联网</description>
	<lastBuildDate>Wed, 21 Jul 2010 12:27:17 +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>获得WordPress 所有评论者的邮箱列表</title>
		<link>http://www.zfreet.com/post/regular_expression_sql_mail.html</link>
		<comments>http://www.zfreet.com/post/regular_expression_sql_mail.html#comments</comments>
		<pubDate>Fri, 05 Jun 2009 17:07:32 +0000</pubDate>
		<dc:creator>ZFreet</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[不听老人言]]></category>
		<category><![CDATA[PHPMyAdmin]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[正式表达式]]></category>
		<category><![CDATA[邮箱]]></category>

		<guid isPermaLink="false">http://www.zfreet.com/post/regular_expression_sql_mail.html</guid>
		<description><![CDATA[<p>为了达到一个不可告人的目的，我需要获得一个WordPress 上面所有评论者的邮箱列表，总体思路就是通过SQL 数据库导出数据，然后批量整理文本，是个菜鸟技巧。</p>
<p><strong>一、导出数据</strong></p>
<p><strong></strong>登录自己的Phpmyadmin 后台，定位到“<strong>表 : (前辍)_comments &#62; 字段：comment_author_email</strong>”，然后“导出”为文本存到本地。</p>
<p>整个过程只需要不到10次点击，就不用给出SQL 执行语句了，其实我也不知道。</p>
<p><strong>二、批量整理数据</strong></p>
<p><strong></strong>这才是本文的重点部分。这种大量且有规则的文本整理，需要用到“正式表达式”，就是想记录一下这个，备忘。</p>
<p>所以，下面的内容只适合支持“正式表达式”的文本编辑工具，比如Notepad++ 之类<small> [...]</small></p>]]></description>
			<content:encoded><![CDATA[<p>为了达到一个不可告人的目的，我需要获得一个WordPress 上面所有评论者的邮箱列表，总体思路就是通过SQL 数据库导出数据，然后批量整理文本，是个菜鸟技巧。</p>
<p><strong>一、导出数据</strong></p>
<p><strong></strong>登录自己的Phpmyadmin 后台，定位到“<strong>表 : (前辍)_comments &gt; 字段：comment_author_email</strong>”，然后“导出”为文本存到本地。</p>
<p>整个过程只需要不到10次点击，就不用给出SQL 执行语句了，其实我也不知道。</p>
<p><strong>二、批量整理数据</strong></p>
<p><strong></strong>这才是本文的重点部分。这种大量且有规则的文本整理，需要用到“正式表达式”，就是想记录一下这个，备忘。</p>
<p>所以，下面的内容只适合支持“正式表达式”的文本编辑工具，比如Notepad++ 之类的高级玩意。</p>
<ol>
<li>打开导出的数据，手动删除多余的备注信息，留下数据主体部分，是这种格式的：<strong>(2, &#8216;abc@xyz.com&#8217;),</strong></li>
<li>现在就需要剔出前后多余部分了，Ctrl+H，输入查找规则“<strong>.\d, &#8216;(.*)&#8217;\),</strong>”，输入替换规则“<strong>\1</strong>”，都是下划线部分。</li>
</ol>
<p><img class="picasa" src="http://www.zfreet.com/wp-content/plugins/pika/readimg.php?src=http%3A%2F%2Flh5.gouride.com%2F_GucGz1n6grE%2FSipvoPP6hqI%2FAAAAAAAAEdQ%2FrGfFP61-5RM%2Fs512%2F%E6%AD%A3%E5%88%99.jpg" alt="" /></p>
<p>PS：为了达到一条规则就能搞定的高级境界，开始想得有些复杂，都用到了分枝条件，搞了好久依然未果；当然也可以用笨点但更方便的方法，分两次去除邮箱的头和尾，我太折腾了，谁叫我是个菜鸟。</p>
<p>得到需要的列表，再用Excel 排序一下，开始我那不可告人的目的去了……</p>
<br /><h4>本文评论 »</h4><ul><li><b><a href='http://www.lishuo.org' rel='external nofollow' class='url' rel="external">李硕</a>&nbsp;<img src="http://www.zfreet.com/wp-content/plugins/reviewers-info/icon/windows.png" title="Windows 7" alt="Windows 7"/>&nbsp;<img src="http://www.zfreet.com/wp-content/plugins/reviewers-info/icon/chrome.png" title="Google Chrome 5.0.375.17" alt="Google Chrome 5.0.375.17"/></b> - <small><a href="http://www.zfreet.com/post/regular_expression_sql_mail.html#comment-3067">2010/07/03</a></small> ：我试了。。。不是很好用哈。。。。导出的txt很乱 </li><li><b><a href='http://www.ZFreet.com/' rel='external nofollow' class='url'>ZFreet</a>&nbsp;<img src="http://www.zfreet.com/wp-content/plugins/reviewers-info/icon/windows.png" title="Windows XP" alt="Windows XP"/>&nbsp;<img src="http://www.zfreet.com/wp-content/plugins/reviewers-info/icon/opera.png" title="Opera 9.80" alt="Opera 9.80"/></b> - <small><a href="http://www.zfreet.com/post/regular_expression_sql_mail.html#comment-3068">2010/07/03</a></small> ：不会啊，我这样得到的TXT 就是一行一个邮箱地址。 </li></ul><p><hr style="height:1px;"><small>© <a href="http://www.ZFreet.com/" target="_blank"><b>ZFreet CHeung</b></a> 2010 | <a href="http://www.zfreet.com/post/regular_expression_sql_mail.html">原文链接</a> | <a href="http://www.zfreet.com/post/regular_expression_sql_mail.html#comments">2 条评论</a> | <a href="http://freeimer.com/guestbook/" rel="external">留言</a> | <a href="http://creativecommons.org/licenses/by-nc-nd/2.5/cn/" rel="external">cc</a> fbd921dfda9476ce! (38.107.191.81) </small><hr></p>

<p><h2>相关文章 »</h2><ol><li><a href='http://www.zfreet.com/post/wordpress-thumbnails-solution-1.html' rel='bookmark' title='《一套自用WordPress 缩略图解决方案（一）》'>一套自用WordPress 缩略图解决方案（一）</a>： <small>之所以要写这篇简陋的“方案”，是因为之前被WP 的缩略图折腾了不少回，最后，总算被折腾出了一个比较满意的缩略图效果——效果演示见此，它其实是</small></li><li><a href='http://www.zfreet.com/post/windows_live_mail_id_url.html' rel='bookmark' title='《直接注册@Live.com 邮箱地址 非修改IE设置》'>直接注册@Live.com 邮箱地址 非修改IE设置</a>： <small>正如之前LiveSino 的独家爆料消息所说，今天Microsoft 已经放出了@Live 邮箱的公开注册地址，比如中国用户就可以到这个链接</small></li><li><a href='http://www.zfreet.com/post/yahoo-com_mail_this_id_is_not_available.html' rel='bookmark' title='《如何申请@Yahoo.com 邮箱？》'>如何申请@Yahoo.com 邮箱？</a>： <small>如果你属于以下几种情况，可以忽略本文，免得浪费大家宝贵生命：

已经有了一个Yahoo.com 的邮箱，且不打算再申请一个；
没有Yahoo</small></li><li><a href='http://www.zfreet.com/post/several-ways-to-use-twitter-in-lan.html' rel='bookmark' title='《在局域墙中使用Twitter 的几种方法》'>在局域墙中使用Twitter 的几种方法</a>： <small>这了这篇文章，我自造了一个新词——局域墙：由一堵不断加高的墙围成的地球上最大的局域网，以避免使用那些不太安全的关键词，大家能意会就行了，现在</small></li><li><a href='http://www.zfreet.com/post/boblog-to-wordpress-301.html' rel='bookmark' title='《从Bo-Blog 搬到WordPress 的301重定向》'>从Bo-Blog 搬到WordPress 的301重定向</a>： <small>约三个月前，我从Bo-Blog 搬到了WordPress，当时我最为困扰的有两个事情：日志数据与搜索收录。
因为自动批量转换工具无效，我只好</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.zfreet.com/post/regular_expression_sql_mail.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
