今天换了手机,第一件要紧事就是恢复联系人名单。旧手机是HTC c720W,新手机是Nokia 5320XM,其联系人名单格式不一。难道要我一条条输入吗?阿弥陀佛,几百组联系人的信息,手动操作会死人的。

我看了一下以前备份的HTC c720W联系人名单,(说到这里,表扬一下自己:勤于备份真是好习惯,万一某天灾难降临,你还有个指望),发现其格式是这样的:


    
      -2147483070
      0
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      SomeBody
      
      1355***9214
      
      

      
      
      
      
      
      
      
      ***
      
      <suffix/>
      <homeaddressstreet/>
      <homeaddresscity/>
      <homeaddressstate/>
      <homeaddresspostalcode/>
      <homeaddresscountry/>
      <otheraddressstreet/>
      <otheraddresscity/>
      <otheraddressstate/>
      <otheraddresspostalcode/>
      <otheraddresscountry/>
      <businessaddressstreet/>
      <businessaddresscity/>
      <businessaddressstate/>
      <businessaddresscountry/>
      <anniversary>1899-12-30 00:00:00</anniversary>
      <birthday>1899-12-30 00:00:00</birthday>
    </item>
    <item>
    ...
    </item>
</contacts>
</pre>
<p>而诺基亚的通讯录格式是这样的:</p>
<pre lang="csv" line="1" colla="-">
"名称","名","中间名","姓","后缀","职务","公司","生日","SIP 地址","一键通","共享视图","用户 ID","备忘","常用手机","常用电话","常用电子邮件","常用传真","常用视频电话","常用网址","常用 VOIP 地址","常用邮政信箱","常用分机","常用街道","常用邮政编码","常用城市","常用省/市/自治区","常用国家/地址","家庭手机","住宅电话","家庭电子邮件","住宅传真","家庭视频电话","家庭网址","家庭 VOIP 地址","家庭邮政信箱","家庭分机","家庭街道","家庭邮政编码","家庭城市","家庭省/市/自治区","家庭国家/地区","公司手机","公司电话","公司电子邮件","公司传真","公司视频电话","公司网址","公司 VOIP 地址","公司邮政信箱","公司分机","公司街道","公司邮政编码","公司城市","公司省/市/自治区","公司国家/地区",""
</pre>
<p>本想偷懒,去找个xml2csv什么的,不过不太好用。还是请“正则表达式”这个老朋友帮忙吧!</p>
<p>分析xml文件,发现只有<br />
mobiletelephonenumber,businesstelephonenumber,hometelephonenumber,firstname,lastname这5个字段是有用的;对应的csv字段名称是:<br />
“名”,”姓”,”常用手机”,”常用电话”,”公司电话”</p>
<p>其余的字段大可放心删除。</p>
<p>祭出RegexBuddy,写了这样一条正则表达式:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="python" style="font-family:monospace;">result = <span style="color: #dc143c;">re</span>.<span style="color: black;">sub</span><span style="color: black;">(</span>
	r<span style="color: #483d8b;">"""(?smx)(?#"名","姓","常用手机","常用电话","公司电话")
	^<span style="color: #000099; font-weight: bold;">\s</span>*<item>.*?
	<mobiletelephonenumber/?>(?P<mobile>[^<span style="color: #000099; font-weight: bold;">\s</span><]*).*?
	<businesstelephonenumber/?>(?P<business>[^<span style="color: #000099; font-weight: bold;">\s</span><]*).*?
	<hometelephonenumber/?>(?P<home>[^<span style="color: #000099; font-weight: bold;">\s</span><]*).*?
	<firstname/?>(?P<first>[^<span style="color: #000099; font-weight: bold;">\s</span><]*).*?
	<lastname/?>(?P<lastname>[^<span style="color: #000099; font-weight: bold;">\s</span><]*).*?
	</item>"""</span>, 
	r<span style="color: #483d8b;">'"<span style="color: #000099; font-weight: bold;">\g</span><first>","<span style="color: #000099; font-weight: bold;">\g</span><lastname>","<span style="color: #000099; font-weight: bold;">\g</span><mobile>","<span style="color: #000099; font-weight: bold;">\g</span><home>","<span style="color: #000099; font-weight: bold;">\g</span><business>"'</span>, subject<span style="color: black;">)</span></pre></td></tr></table></div>

<p>之所以使用python格式来写正则,是因为它支持命名捕获,看起人直观一些。其实整个替换过程是在RegexBuddy中进行的。</p>
<p>替换后,保存为CSV文件,使用诺基亚自带的软件导入,几百个联系人就又重新归位了。大爽。</p>
<p>附图:<br />
<a href="http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html"  target="_blank"><img src="http://i293.photobucket.com/albums/mm60/zhasm/iregex/regex_contact_manager.png" border="0" alt="Photobucket"></a><br />
<font color="#ffffff">25f30c5f</font></p>
              </div>
                                          <div class="post-tags"> Tags: <a href="http://iregex.org/blog/tag/csv" rel="tag">csv</a>, <a href="http://iregex.org/blog/tag/xml" rel="tag">xml</a>, <a href="http://iregex.org/blog/tag/%e6%89%8b%e6%9c%ba" rel="tag">手机</a></div>
                               <!-- socialize -->
   <div class="shareThis">
    <a href="#" class="share">Share this post!</a>
    <ul class="bubble">
     <a href="http://twitter.com/home?status=使用正则表达式转换手机联系人名单+-+http://tinyurl.com/yfcprrd" class="twitter" title="Tweet This!"><span>Twitter</span></a>
     <a href="http://digg.com/submit?phase=2&url=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html&title=使用正则表达式转换手机联系人名单" class="digg" title="Digg this!"><span>Digg</span></a>
     <a href="http://www.facebook.com/share.php?u=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html&t=使用正则表达式转换手机联系人名单" class="facebook" title="Share this on Facebook"><span>Facebook</span></a>
     <a href="http://del.icio.us/post?url=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html&title=使用正则表达式转换手机联系人名单" class="delicious" title="Share this on del.icio.us"><span>Delicious</span></a>
     <a href="http://www.stumbleupon.com/submit?url=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html&title=使用正则表达式转换手机联系人名单" class="stumbleupon" title="Stumbled upon something good? Share it on StumbleUpon"><span>StumbleUpon</span></a>
     <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html&title=使用正则表达式转换手机联系人名单" class="google" title="Add this to Google Bookmarks"><span>Google Bookmarks</span></a>
     <a href="http://www.linkedin.com/shareArticle?mini=true&url=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html&title=使用正则表达式转换手机联系人名单&summary=<p>今天换了手机,第一件要紧事就是恢复联系人名单。旧手机是HTC c720W,新手机是Nokia 5320XM,其联系人名单格式不一。难道要我一条条输入吗?阿弥陀佛,几百组联系人的信息,手动操作会死... &source=我爱正则表达式" class="linkedin" title="Share this on Linkedin"><span>LinkedIn</span></a>
          <a href="http://technorati.com/faves?add=http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html" class="technorati" title="Share this on Technorati"><span>Technorati Favorites</span></a>
    </ul>
   </div>
   <!-- /socialize -->
   <div class="clear"></div>
                <p class="post-meta">
                    This entry was posted on July 5, 2009, 6:17 pm and is filed under <a href="http://iregex.org/blog/category/%e5%ba%94%e7%94%a8" title="View all posts in 应用" rel="category tag">应用</a>. You can follow any responses to this entry through <a href="http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html/feed" title="RSS 2.0">RSS 2.0</a>.
                    You can <a href="#respond">leave a response</a>, or <a href="http://iregex.org/blog/convert-contact-format-from-htc-to-nokia.html/trackback" rel="trackback">trackback</a> from your own site.                        		  </p>

        </div>
        <!-- /post -->

       
       
       

<!-- tabbed content -->
<div class="tabbed-content post-tabs" id="post-tabs">

  <!-- tab navigation (items must be in reverse order because of the tab-design) -->
 <div class="tabs-wrap">
  <ul class="tabs">
    <li class="related-posts"><a href="#section-relatedPosts"><span>Related Posts</span></a></li>
    <li class="trackbacks"><a href="#section-trackbacks"><span>Trackbacks (0)</span></a></li>
    <li class="comments"><a href="#section-comments"><span>Comments (3)</span></a></li>
  </ul>
  <div class="clear"></div>
 </div>
 <!-- /tab nav -->
 
 <!-- tab sections -->
 <div class="sections">

  <!-- comments -->
  <div class="section" id="section-comments">
         <ul id="comments" class="comments">
     
  <!-- comment entry -->
  <li class="comment even thread-even depth-1 withAvatars" id="comment-725">
    <div class="comment-head">

      <div class="avatar-box"><img alt='' src='http://www.gravatar.com/avatar/ba37ad56f95b7a528f13b2adad8878f4?s=48&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&r=G' class='avatar avatar-48 photo' height='48' width='48' /></div>      <div class="author">
       <span class="by"><a class="comment-id" href="#comment-725">#1</a> written by <b class="comment-author" id="comment-author-725">只是彼岸花</b> </span><br />
        July 10, 2009 - 6:43 am      </div>


      <div class="controls bubble">
                 <a rel='nofollow' class='comment-reply-link' href='/blog/convert-contact-format-from-htc-to-nokia.html?replytocom=725#respond' onclick='return addComment.moveForm("comment-reply-725", "725", "respond", "62")'>Reply</a>          <a class="quote" title="Quote" href="#respond">Quote</a>
              </div>
    </div>
    <div class="comment-body clearfix" id="comment-body-725">
            <div class="comment-text"><p>你好,看了你的Regular Expression讲解真的收益良多,<br />
我也下载了一个Regexbuddy,希望以后能一起学习正则表达式,很希望和你聊聊,这是我的qq,290205102,方便的话请加我为好友,</p>
</div>
      <a id="comment-reply-725"></a>
    </div>

<ul class='children'>

  <!-- comment entry -->
  <li class="comment byuser comment-author-admin bypostauthor odd alt depth-2 withAvatars" id="comment-948">
    <div class="comment-head">

      <div class="avatar-box"><img alt='' src='http://www.gravatar.com/avatar/7abbf8b4333920bc2686eb06c3923caa?s=48&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&r=G' class='avatar avatar-48 photo' height='48' width='48' /></div>      <div class="author">
       <span class="by"><a class="comment-id" href="#comment-948">#2</a> written by <a class="comment-author websnapr" id="comment-author-948" href="http://iregex.org">admin</a> </span><br />
        August 11, 2009 - 4:38 pm      </div>


      <div class="controls bubble">
                 <a rel='nofollow' class='comment-reply-link' href='/blog/convert-contact-format-from-htc-to-nokia.html?replytocom=948#respond' onclick='return addComment.moveForm("comment-reply-948", "948", "respond", "62")'>Reply</a>          <a class="quote" title="Quote" href="#respond">Quote</a>
              </div>
    </div>
    <div class="comment-body clearfix" id="comment-body-948">
            <div class="comment-text"><p>@只是彼岸花<br />
已加。</p>
<p>@zlf<br />
该问题在http://regex.me/thread-100.html 有回复。</p>
</div>
      <a id="comment-reply-948"></a>
    </div>

</li>
</ul>
</li>

  <!-- comment entry -->
  <li class="comment even thread-odd thread-alt depth-1 withAvatars" id="comment-922">
    <div class="comment-head">

      <div class="avatar-box"><img alt='' src='http://www.gravatar.com/avatar/04ee8beb3a135782b35889634c221594?s=48&d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D48&r=G' class='avatar avatar-48 photo' height='48' width='48' /></div>      <div class="author">
       <span class="by"><a class="comment-id" href="#comment-922">#3</a> written by <b class="comment-author" id="comment-author-922">zlf</b> </span><br />
        August 3, 2009 - 10:04 pm      </div>


      <div class="controls bubble">
                 <a rel='nofollow' class='comment-reply-link' href='/blog/convert-contact-format-from-htc-to-nokia.html?replytocom=922#respond' onclick='return addComment.moveForm("comment-reply-922", "922", "respond", "62")'>Reply</a>          <a class="quote" title="Quote" href="#respond">Quote</a>
              </div>
    </div>
    <div class="comment-body clearfix" id="comment-body-922">
            <div class="comment-text"><p>看了你的博客,感觉你对正则很有研究,想请教一个问题:偶数个a和奇数个b的正则怎么写?谢谢~</p>
</div>
      <a id="comment-reply-922"></a>
    </div>

</li>
     </ul>
     <div class="clear"></div>
     
     
    
    <!-- comment form -->
    <div class="comment-form" id="respond">
            <script type="text/javascript">
      /* <![CDATA[ */
      function checkvalues(){
       if(jQuery('#field-author').val()=='Name (required)') jQuery('#field-author').val('');
       if(jQuery('#field-email').val()=='E-mail (required, will not be published)') jQuery('#field-email').val('');
       if(jQuery('#field-url').val()==('Website' || 'http://')) jQuery('#field-url').val('');
      }
      /* ]]> */
      </script>
            <form action="http://iregex.org/wp-comments-post.php" method="post" id="commentform" onsubmit="checkvalues();">
                  <div class="cancel-comment-reply"><a rel="nofollow" id="cancel-comment-reply-link" href="/blog/convert-contact-format-from-htc-to-nokia.html#respond" style="display:none;">Cancel Reply</a></div>
                  	                <div id="author-info">
            <div class="row">
              <input type="text" name="author" id="field-author" class="validate[required,length[0,40]] textfield clearField" value="Name (required)" size="40" />
                          </div>
            <div class="row">
              <input type="text" name="email" id="field-email" class="validate[required,custom[email]] textfield clearField" value="E-mail (required, will not be published)" size="40" />
                          </div>
            <div class="row">
              <input type="text" name="url" id="field-url" class="textfield clearField" value="Website" size="40" />
                          </div>
  		  </div>
        
        <!-- comment input -->
        <div class="row">
        	<textarea name="comment" id="comment" class="validate[required]" rows="8" cols="50"></textarea>
        	        	<input type='hidden' name='comment_post_ID' value='62' id='comment_post_ID' />
<input type='hidden' name='comment_parent' id='comment_parent' value='0' />

                 <br />
        </div>
        <!-- /comment input -->

        
        <!-- comment submit and rss -->
        <div id="submitbox">
		<input name="submit" type="submit" id="submit" class="button" value="Submit Comment" />
         <input type="hidden" name="formInput" />
        </div>

      </form>



    </div>
    <div class="clear"></div>
    <!-- /comment form -->
    

     </div>
  <!-- /comments -->

   
  <!-- trackbacks -->
	<div class="section" id="section-trackbacks">
         <h6 class="title">No trackbacks yet.</h6>
      </div>
  <!-- /trackbacks -->

  <!-- related posts -->
  <div class="section" id="section-relatedPosts">
            
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
         <!-- short post -->
         <div id="post-52" class="post-52 post hentry category-miscellaneous tag-curl tag-fanfou tag-python tag-xml tag-xpath">
	   	   <h3 id="post-52" class="title"><a href="http://iregex.org/blog/fanfou-msg-extractor-via-new-api.html" rel="bookmark" title="Permanent Link to 使用饭否新版API编写批量抓取饭否消息的程序">使用饭否新版API编写批量抓取饭否消息的程序</a></h3>
           <div class="post-summary">
             <p>January 6, 2009 - 10:27 am</p>
             <p>Tags: <a href="http://iregex.org/blog/tag/curl" rel="tag">curl</a>, <a href="http://iregex.org/blog/tag/fanfou" rel="tag">fanfou</a>, <a href="http://iregex.org/blog/tag/python" rel="tag">python</a>, <a href="http://iregex.org/blog/tag/xml" rel="tag">xml</a>, <a href="http://iregex.org/blog/tag/xpath" rel="tag">xpath</a><br /> Posted in <a href="http://iregex.org/blog/category/miscellaneous" title="View all posts in 杂项" rel="category tag">杂项</a>  |   <a href="http://iregex.org/blog/fanfou-msg-extractor-via-new-api.html#comments" title="Comment on 使用饭否新版API编写批量抓取饭否消息的程序">3 Comments</a></p>
            </div>
           <div class="post-excerpt"><p> 我在断断续续地写一款抓饭程序。预想的功能包括:下载、更新饭否消息,搜索,统计。<br />
近日饭否官方释出搜索功能,可以使用关键字搜索自己曾经发布的消息。作离线版的饭否消息管... </div>
  	     </div>
         <!-- /short post -->
                 <!-- short post -->
         <div id="post-35" class="post-35 post hentry category-tutorial tag-fanfou tag-firefox tag-python tag-regex tag-xml tag-xpath">
	   	   <h3 id="post-35" class="title"><a href="http://iregex.org/blog/fanfou-message-extractor-from-minidom-to-xpath.html" rel="bookmark" title="Permanent Link to 饭否消息解析之从minidom到xpath">饭否消息解析之从minidom到xpath</a></h3>
           <div class="post-summary">
             <p>October 14, 2008 - 6:00 pm</p>
             <p>Tags: <a href="http://iregex.org/blog/tag/fanfou" rel="tag">fanfou</a>, <a href="http://iregex.org/blog/tag/firefox" rel="tag">firefox</a>, <a href="http://iregex.org/blog/tag/python" rel="tag">python</a>, <a href="http://iregex.org/blog/tag/regex" rel="tag">regex</a>, <a href="http://iregex.org/blog/tag/xml" rel="tag">xml</a>, <a href="http://iregex.org/blog/tag/xpath" rel="tag">xpath</a><br /> Posted in <a href="http://iregex.org/blog/category/tutorial" title="View all posts in 教程" rel="category tag">教程</a>  |   <a href="http://iregex.org/blog/fanfou-message-extractor-from-minidom-to-xpath.html#comments" title="Comment on 饭否消息解析之从minidom到xpath">5 Comments</a></p>
            </div>
           <div class="post-excerpt"><p>抛板砖,引白玉:为何不用xpath,什么是xpath?<br />
最近拾起了以前的小项目,在完善上篇文章发布后,“那个谁”的回复让我很感兴趣。他问,“为什么不用xpath?”<br />
xpath是什么东东?... </div>
  	     </div>
         <!-- /short post -->
                 <!-- short post -->
         <div id="post-33" class="post-33 post hentry category-tutorial tag-fanfou tag-perl tag-python tag-regex tag-xml">
	   	   <h3 id="post-33" class="title"><a href="http://iregex.org/blog/fanfou-message-extractor-regex-vs-xml.html" rel="bookmark" title="Permanent Link to 饭否消息析取之regex vs xml">饭否消息析取之regex vs xml</a></h3>
           <div class="post-summary">
             <p>October 8, 2008 - 6:53 pm</p>
             <p>Tags: <a href="http://iregex.org/blog/tag/fanfou" rel="tag">fanfou</a>, <a href="http://iregex.org/blog/tag/perl" rel="tag">perl</a>, <a href="http://iregex.org/blog/tag/python" rel="tag">python</a>, <a href="http://iregex.org/blog/tag/regex" rel="tag">regex</a>, <a href="http://iregex.org/blog/tag/xml" rel="tag">xml</a><br /> Posted in <a href="http://iregex.org/blog/category/tutorial" title="View all posts in 教程" rel="category tag">教程</a>  |   <a href="http://iregex.org/blog/fanfou-message-extractor-regex-vs-xml.html#comments" title="Comment on 饭否消息析取之regex vs xml">6 Comments</a></p>
            </div>
           <div class="post-excerpt"><p>页内导航:</p>
<p>能否只用官方的API来获取全部饭否消息?<br />
饭否消息结构<br />
使用regex解析饭否消息<br />
使用xml解析饭否消息<br />
两相比较<br />
相关阅读</p>
<p>批量导出饭否程序的方法... </div>
  	     </div>
         <!-- /short post -->
               </div>
  <!-- /related posts -->
  
 </div>
 <!-- /tab sections -->

</div>
<!-- /tabbed content -->


    </div>
    <!-- /primary content -->

    
<div id="sidebar">
 <ul class="sidebar-blocks">

        <li class="block"><div class="block-widget_gajaxsearch" id="instance-google-ajax-search"><h3 class="title"><span></span></h3><div class="block-div"></div><div class="block-div-arrow"></div>                <div id="searchcontrol" width="100%">
                    <form method="get" action="http://blogsearch.google.com/blogsearch ">
                    <input name="as_q" size="16" maxlength="255" value="" type="text">
                    <input name="sa" value="Search" type="submit">
                    <input name="bl_url" value="http://iregex.org" type="hidden">
                    </form>
                </div>
        </div></li><li class="block"><div class="block-widget_text" id="instance-text-315883352"><h3 class="title"><span>Subscribe</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>			<div class="textwidget"><!-- Feedsky FEED发布代码开始 --><!-- FEED自动发现标记开始 --><link title="RSS 2.0" rel="alternate" type="application/rss+xml" href="http://feed.iregex.org" /><!-- FEED自动发现标记结束 -->

<table><tbody>
    <tr>
      <td valign="top"><a target="_blank" href="http://www.zhuaxia.com/add_channel.php?url=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="抓虾" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_zhuaxia.gif" /></a></td>

      <td valign="top"><a target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="鲜果" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_xianguo.jpg" /></a><a target="_blank" href="http://www.pageflakes.com/subscribe.aspx?url=http://feed.iregex.org"></a></td>
    </tr>

    <tr>
      <td valign="top"><a target="_blank" href="http://fusion.google.com/add?feedurl=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="google reader" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_google.gif" /></a></td>

      <td valign="top"><a target="_blank" href="http://add.my.yahoo.com/rss?url=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="my yahoo" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_yahoo.gif" /></a></td>
    </tr>

    <tr>
      <td valign="top"><a target="_blank" href="http://www.bloglines.com/sub/http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="bloglines" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_bloglines.gif" /></a></td>

      <td valign="top"><a target="_blank" href="http://www.pageflakes.com/subscribe.aspx?url=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="pageflakes" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_pageflakes.gif" /></a><a target="_blank" href="http://www.xianguo.com/subscribe.php?url=http://feed.iregex.org"></a></td>
    </tr>

    <tr>
      <td valign="top"><a target="_blank" href="http://inezha.com/add?url=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="哪吒" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_nazha.gif" /></a></td>

      <td valign="top"><a target="_blank" href="http://reader.yodao.com/#url=http://feed.iregex.org"><img style="margin-bottom: 3px" border="0" alt="有道" vspace="2" src="http://img.feedsky.com/images/icon_subshot02_youdao.gif" /></a></td>
    </tr>
  </tbody></table>
<!-- Feedsky FEED发布代码结束 -->
<!-- 以下是统计代码 -->
<script type="text/javascript" src="http://js.tongji.linezing.com/340190/tongji.js"></script><noscript><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/340190/tongji.gif"/></a></noscript>
</div>
		</div></li><li class="block"><div class="block-widget_categories" id="instance-categories-2"><h3 class="title"><span>Categories</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>		<ul>
	<li class="cat-item cat-item-6"><a href="http://iregex.org/blog/category/books" title="View all posts filed under 书籍">书籍</a> (4)
</li>
	<li class="cat-item cat-item-71"><a href="http://iregex.org/blog/category/%e5%ba%94%e7%94%a8" title="View all posts filed under 应用">应用</a> (7)
</li>
	<li class="cat-item cat-item-7"><a href="http://iregex.org/blog/category/tutorial" title="View all posts filed under 教程">教程</a> (17)
</li>
	<li class="cat-item cat-item-4"><a href="http://iregex.org/blog/category/news" title="View all posts filed under 新闻">新闻</a> (3)
</li>
	<li class="cat-item cat-item-1"><a href="http://iregex.org/blog/category/miscellaneous" title="View all posts filed under 杂项">杂项</a> (11)
</li>
	<li class="cat-item cat-item-59"><a href="http://iregex.org/blog/category/%e7%bf%bb%e8%af%91" title="View all posts filed under 翻译">翻译</a> (4)
</li>
	<li class="cat-item cat-item-38"><a href="http://iregex.org/blog/category/software" title="View all posts filed under 软件">软件</a> (11)
</li>
	<li class="cat-item cat-item-5"><a href="http://iregex.org/blog/category/qa" title="View all posts filed under 问答">问答</a> (4)
</li>
		</ul>
</div></li><li class="block"><div class="block-widget_tag_cloud" id="instance-tag_cloud-3"><h3 class="title"><span>Tag Cloud</span></h3><div class="block-div"></div><div class="block-div-arrow"></div><div><a href='http://iregex.org/blog/tag/tutorial' class='tag-link-7' title='2 topics' style='font-size: 11.1111111111pt;'>教程</a>
<a href='http://iregex.org/blog/tag/%e6%ad%a3%e5%88%99%e5%bc%8f' class='tag-link-49' title='4 topics' style='font-size: 14.9135802469pt;'>正则式</a>
<a href='http://iregex.org/blog/tag/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f' class='tag-link-50' title='4 topics' style='font-size: 14.9135802469pt;'>正则表达式</a>
<a href='http://iregex.org/blog/tag/software' class='tag-link-38' title='3 topics' style='font-size: 13.1851851852pt;'>软件</a>
<a href='http://iregex.org/blog/tag/%e9%be%99%e4%b9%a6' class='tag-link-78' title='2 topics' style='font-size: 11.1111111111pt;'>龙书</a>
<a href='http://iregex.org/blog/tag/adobe' class='tag-link-52' title='1 topic' style='font-size: 8pt;'>Adobe</a>
<a href='http://iregex.org/blog/tag/asp' class='tag-link-9' title='1 topic' style='font-size: 8pt;'>asp</a>
<a href='http://iregex.org/blog/tag/cheatsheet' class='tag-link-10' title='1 topic' style='font-size: 8pt;'>cheatsheet</a>
<a href='http://iregex.org/blog/tag/chinese' class='tag-link-11' title='5 topics' style='font-size: 16.2962962963pt;'>chinese</a>
<a href='http://iregex.org/blog/tag/chm' class='tag-link-12' title='1 topic' style='font-size: 8pt;'>chm</a>
<a href='http://iregex.org/blog/tag/curl' class='tag-link-56' title='3 topics' style='font-size: 13.1851851852pt;'>curl</a>
<a href='http://iregex.org/blog/tag/dfa' class='tag-link-76' title='3 topics' style='font-size: 13.1851851852pt;'>DFA</a>
<a href='http://iregex.org/blog/tag/download' class='tag-link-13' title='1 topic' style='font-size: 8pt;'>download</a>
<a href='http://iregex.org/blog/tag/dreamweaver' class='tag-link-14' title='1 topic' style='font-size: 8pt;'>dreamweaver</a>
<a href='http://iregex.org/blog/tag/earthquake' class='tag-link-15' title='1 topic' style='font-size: 8pt;'>earthquake</a>
<a href='http://iregex.org/blog/tag/ebook' class='tag-link-16' title='1 topic' style='font-size: 8pt;'>ebook</a>
<a href='http://iregex.org/blog/tag/excel' class='tag-link-17' title='1 topic' style='font-size: 8pt;'>excel</a>
<a href='http://iregex.org/blog/tag/expresso' class='tag-link-18' title='2 topics' style='font-size: 11.1111111111pt;'>expresso</a>
<a href='http://iregex.org/blog/tag/fanfou' class='tag-link-19' title='4 topics' style='font-size: 14.9135802469pt;'>fanfou</a>
<a href='http://iregex.org/blog/tag/firefox' class='tag-link-20' title='2 topics' style='font-size: 11.1111111111pt;'>firefox</a>
<a href='http://iregex.org/blog/tag/geshi' class='tag-link-21' title='1 topic' style='font-size: 8pt;'>geshi</a>
<a href='http://iregex.org/blog/tag/google' class='tag-link-3' title='2 topics' style='font-size: 11.1111111111pt;'>google</a>
<a href='http://iregex.org/blog/tag/grep' class='tag-link-60' title='2 topics' style='font-size: 11.1111111111pt;'>grep</a>
<a href='http://iregex.org/blog/tag/just-great-software' class='tag-link-22' title='2 topics' style='font-size: 11.1111111111pt;'>just great software</a>
<a href='http://iregex.org/blog/tag/languages' class='tag-link-23' title='1 topic' style='font-size: 8pt;'>languages</a>
<a href='http://iregex.org/blog/tag/mtracer' class='tag-link-24' title='1 topic' style='font-size: 8pt;'>mtracer</a>
<a href='http://iregex.org/blog/tag/newbie' class='tag-link-25' title='2 topics' style='font-size: 11.1111111111pt;'>newbie</a>
<a href='http://iregex.org/blog/tag/nfa' class='tag-link-75' title='3 topics' style='font-size: 13.1851851852pt;'>NFA</a>
<a href='http://iregex.org/blog/tag/pdf' class='tag-link-26' title='5 topics' style='font-size: 16.2962962963pt;'>pdf</a>
<a href='http://iregex.org/blog/tag/perl' class='tag-link-27' title='9 topics' style='font-size: 20.0987654321pt;'>perl</a>
<a href='http://iregex.org/blog/tag/php' class='tag-link-28' title='2 topics' style='font-size: 11.1111111111pt;'>php</a>
<a href='http://iregex.org/blog/tag/plugin' class='tag-link-29' title='1 topic' style='font-size: 8pt;'>plugin</a>
<a href='http://iregex.org/blog/tag/powergrep' class='tag-link-30' title='5 topics' style='font-size: 16.2962962963pt;'>powergrep</a>
<a href='http://iregex.org/blog/tag/project-babel' class='tag-link-31' title='1 topic' style='font-size: 8pt;'>project babel</a>
<a href='http://iregex.org/blog/tag/python' class='tag-link-32' title='7 topics' style='font-size: 18.3703703704pt;'>python</a>
<a href='http://iregex.org/blog/tag/recursive' class='tag-link-90' title='2 topics' style='font-size: 11.1111111111pt;'>recursive</a>
<a href='http://iregex.org/blog/tag/regex' class='tag-link-34' title='12 topics' style='font-size: 22pt;'>regex</a>
<a href='http://iregex.org/blog/tag/regexbuddy' class='tag-link-35' title='9 topics' style='font-size: 20.0987654321pt;'>regexbuddy</a>
<a href='http://iregex.org/blog/tag/regexguru' class='tag-link-57' title='2 topics' style='font-size: 11.1111111111pt;'>regexguru</a>
<a href='http://iregex.org/blog/tag/tool' class='tag-link-40' title='5 topics' style='font-size: 16.2962962963pt;'>tool</a>
<a href='http://iregex.org/blog/tag/translation' class='tag-link-41' title='3 topics' style='font-size: 13.1851851852pt;'>translation</a>
<a href='http://iregex.org/blog/tag/url' class='tag-link-43' title='2 topics' style='font-size: 11.1111111111pt;'>url</a>
<a href='http://iregex.org/blog/tag/utf8' class='tag-link-44' title='3 topics' style='font-size: 13.1851851852pt;'>utf8</a>
<a href='http://iregex.org/blog/tag/xml' class='tag-link-47' title='4 topics' style='font-size: 14.9135802469pt;'>xml</a>
<a href='http://iregex.org/blog/tag/xpath' class='tag-link-48' title='2 topics' style='font-size: 11.1111111111pt;'>xpath</a></div>
</div></li>		<li class="block"><div class="block-widget_recent_comments" id="instance-recent-comments-3">			<h3 class="title"><span>Comments</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>			<ul id="recentcomments"><li class="recentcomments">smy20011 on <a href="http://iregex.org/blog/text-2-regular-expressions-again.html/comment-page-1#comment-2976">关于从普通文本提取正则表达式的再思考</a></li><li class="recentcomments">tanktang on <a href="http://iregex.org/blog/mastering-regular-expressions-vedio-tutorial-download.html/comment-page-1#comment-2970">《精通正则表达式》视频教程提供下载</a></li><li class="recentcomments">tanktang on <a href="http://iregex.org/about/comment-page-1#comment-2969">About</a></li><li class="recentcomments">乘风 on <a href="http://iregex.org/blog/mastering-regular-expressions-vedio-tutorial-download.html/comment-page-1#comment-2764">《精通正则表达式》视频教程提供下载</a></li><li class="recentcomments">rex on <a href="http://iregex.org/blog/regular-expressions-in-emeditor.html/comment-page-1#comment-2742">EmEditor中的正则表达式</a></li><li class="recentcomments"><a href="http://my.opera.com/jlake/blog/" onclick="javascript:pageTracker._trackPageview('/outbound/commentauthor/my.opera.com');"  rel='external nofollow' class='url'>jlake</a> on <a href="http://iregex.org/blog/regular-expressions-in-emeditor.html/comment-page-1#comment-2741">EmEditor中的正则表达式</a></li><li class="recentcomments">alucard on <a href="http://iregex.org/blog/exploration-on-regular-rexpressions-that-match-chinese.html/comment-page-1#comment-2730">探索匹配中文的正则表达式</a></li><li class="recentcomments"><a href="http://iregex.org"   rel='external nofollow' class='url'>rex</a> on <a href="http://iregex.org/blog/get-duplicated-lines.html/comment-page-1#comment-2726">统计重复文本行的两种方法</a></li></ul>
		</div></li><li class="block"><div class="block-widget_links" id="linkcat-2"><h3 class="title"><span>Blogroll</span></h3><div class="block-div"></div><div class="block-div-arrow"></div>
	<ul class='xoxo blogroll'>
<li><a href="http://anrs.sacredfir.com/" rel="friend" onclick="javascript:pageTracker._trackPageview('/outbound/blogroll/anrs.sacredfir.com');" title="Regex/Python/Django/Ubuntu/Emacs" target="_blank">Anrs Hu</a></li>
<li><a href="http://chunzi.me/" rel="friend co-worker" onclick="javascript:pageTracker._trackPageview('/outbound/blogroll/chunzi.me');" title="less is more (?# #perl #git #vim)" target="_blank">chunzi.me</a></li>
<li><a href="http://www.luanxiang.org/blog/" rel="" onclick="javascript:pageTracker._trackPageview('/outbound/blogroll/www.luanxiang.org');" title="《精通正则表达式》中文第三版译者余晟先生博客" target="_blank">乱象,印迹</a></li>
<li><a href="http://zhasm.com" rel="" onclick="javascript:pageTracker._trackPageview('/outbound/blogroll/zhasm.com');" title="表达意见情感,分享经验心得" target="_blank">深柳堂</a></li>
<li><a href="http://zhiqiang.org/blog/" rel="" onclick="javascript:pageTracker._trackPageview('/outbound/blogroll/zhiqiang.org');" title="科学论述文章(以理论计算机和数学为主),书评及时政经济评论。" target="_blank">阅微堂</a></li>

	</ul>
</div></li>


 </ul>
</div>

    <div class="clear"></div>

   </div>
  </div>
  <!-- /main content -->

 <!-- foooter -->
  <div id="footer">

 


   <div class="page-content">
    <div id="copyright">

     Mystique theme by <a href="http://digitalnature.ro">digitalnature</a> | Powered by <a href="http://wordpress.org/">WordPress</a> <br /> <a class="rss-subscribe" href="http://iregex.org/feed" title="RSS Feeds">RSS Feeds</a> <a class="valid-xhtml" href="http://validator.w3.org/check?uri=referer" title="Valid XHTML">XHTML 1.1</a> <a id="goTop" class="js-link">TOP</a>     
    </div>
   </div>
  </div>
  <!-- /footer -->

 </div>
</div>
<!-- /shadow -->

  
  <script type='text/javascript' src='http://iregex.org/wp-content/themes/mystique/js/jquery.mystique.min.js?ver=2.9.2'></script>

  <script type="text/javascript">
  /* <![CDATA[ */
    var isIE6 = false; /* <- do not change! */
    var isIE = false; /* <- do not change! */
  /* ]]> */
  </script>
  <!--[if lte IE 6]> <script type="text/javascript"> isIE6 = true; isIE = true; </script> <![endif]-->
  <!--[if gte IE 7]> <script type="text/javascript"> isIE = true; </script> <![endif]-->

  <!--[if lte IE 7]>
   <div class="crap-browser-warning">You're using a old and buggy browser. Switch to a <a href="www.mozilla.com/firefox/">normal browser</a> or consider <a href="http://www.microsoft.com/windows/internet-explorer/">upgrading your Internet Explorer</a> to the latest version</div>
  <![endif]-->

  <!-- 145 queries. 1.442 seconds. -->
 </div>
</body>
</html>