﻿<?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++博客-以至宏大，以致高远-文章分类-Others</title><link>http://www.cppblog.com/ewre/category/18247.html</link><description>ewre</description><language>zh-cn</language><lastBuildDate>Fri, 06 Jan 2012 05:25:22 GMT</lastBuildDate><pubDate>Fri, 06 Jan 2012 05:25:22 GMT</pubDate><ttl>60</ttl><item><title>ultraedit正则表示手册</title><link>http://www.cppblog.com/ewre/articles/163683.html</link><dc:creator>ewre</dc:creator><author>ewre</author><pubDate>Fri, 06 Jan 2012 01:20:00 GMT</pubDate><guid>http://www.cppblog.com/ewre/articles/163683.html</guid><wfw:comment>http://www.cppblog.com/ewre/comments/163683.html</wfw:comment><comments>http://www.cppblog.com/ewre/articles/163683.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/ewre/comments/commentRss/163683.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/ewre/services/trackbacks/163683.html</trackback:ping><description><![CDATA[<div><div> 	      <div> 	      	<div>转载自<div><a href="http://shuiranyue.blog.163.com/blog/static/4219903420083234055301/">http://shuiranyue.blog.163.com/blog/static/4219903420083234055301/</a></div></div> 	      </div>         </div>                  <div>                  </div>                               <div style="font-size: 14px; line-height: 20px">UltraEdit 允许在搜索菜单下面列出了的许多搜索和替换功能中使用正则表达式。正则表达式能让更多的复杂的搜索和替换功能变成简单的操作。（中文版界面上显示为&#8220;正规表达式&#8221;）<br />有两个可使用的语法集合。下面的第一表显示出在 UltraEdit 的更早的版本被使用的原来的 UltraEdit 句法。第二表给出了可选的"Unix"类型的正则表达式。这可以从配置单元启用。<br /><br />符号&nbsp; 功能<br />%&nbsp; &nbsp; 匹配行的开始 - 显示搜索字符串必须在行的开始，但是在所选择的结果字符串中不包括任何行终止字符。<br />$&nbsp; &nbsp; 匹配行尾 - 显示搜索字符串必须在行尾，但是在所选择的结果字符串中不包括任何行终止字符。<br />?&nbsp; &nbsp; 除了换行符以外匹配任何单个的字符<br />*&nbsp; &nbsp; 除了换行符匹配任何数量的字符和数字<br />+&nbsp; &nbsp; 前一字符匹配一个或多个，但至少要出现一个<br />++&nbsp; &nbsp; 前一字符匹配零个或多个，但至少要出现一个<br />^b&nbsp; &nbsp; 匹配一个分页<br />^p&nbsp; &nbsp; 匹配一个换行符(CR/LF)(段)(DOS文件)<br />^r&nbsp; &nbsp; 匹配一个换行符(CR 仅仅)(段)(MAC 文件)<br />^n&nbsp; &nbsp; 匹配一个换行符 ( LF 仅仅 )( 段 )( UNIX 文件 )<br />^t&nbsp; &nbsp; 匹配一个标签字符TAB<br />[]&nbsp; &nbsp; 匹配任何单个的字符，或在方括号中的范围<br />^{A^}^{ B^} 匹配表达式A或 B<br />^&nbsp; &nbsp; 重载其后的正规表达式字符<br />^(^)&nbsp; 括或标注为用于替换命令的表达式。<br /><br />一个正则表达式最多可以有9个标注表达式, 按正规表达式的需要而定。<br />相应的替换表达式是 ^x , 替换范围x是1-9。例如：<br />If ^(h*o^) ^(f*s^) matches "hello folks",<br />^2 ^1 would replace it with "folks hello".<br /><br />（hello folks 将被替换成 folks hello。）<br /><br />注： ^ 是实际字符 ^不是Ctl + 键值。<br /><br />例如：<br />m?n 匹配 "man","men","min" 但不匹配 "moon".<br />t*t 匹配 "test","tonight" 和 "tea time" (the "tea t" portion) 但不匹配 "tea<br />time" (newline between "tea " and "time").<br />Te+st 匹配 "test","teest"," teeeest "等等。但是不匹配 "tst"。<br />[aeiou]&nbsp; 匹配每个小写元音。<br />[,.?]&nbsp; 匹配一文字的 ","，"."或 "?"。<br />[0-9, a-z] 匹配任何数位，或小写字母。<br />[~0-9] 除了数字以外匹配任何字符 (~ 意味着"不")<br /><br />你按如下方式可以查找一个表达式A或 B ：<br /><br />"^{John^}^{Tom^}"<br /><br />这将在找John或Tom的出现。应该在 2 个表达式之间没有任何东西。<br /><br />你可以在同一搜索中按如下方式组合A or B and C or D：<br /><br />"^{John^}^{Tom^}^{Smith^}^{Jones^}"<br /><br />这将在John or Tom 后面找 Smith or Jones。<br /><br /><br />下表为"Unix"句法类型的正则表达式。<br /><br />正则表达式 (Unix句法)：<br /><br />符号&nbsp; &nbsp; &nbsp; &nbsp; 功能<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 标记下一个字符作为一个特殊的字符。<br />"n"&nbsp; &nbsp; &nbsp; &nbsp; 匹配字符"n"。"n" 一个换行符或换行符字符。<br />^&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配/定位行的开始。<br />$&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配/定位行的尾。<br />*&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配前面的字符零次或多次。例<br />+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配前面的字符一次或多次。例<br />.&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配除了一个换行符字符匹配任何单个的字符。<br />(expression)标注用于替换命令的表达式。一个正则表达式根据需要，最多可以有9个标注表达式。相应的代替表达式是 x , x的范围是 1-9 。<br /><br /><br />例如：<br /><br />If (h.*o) (f.*s) matches "hello folks",<br />2 1 would replace it with "folks hello".<br />（hello folks 将被替换成 folks hello。）<br /><br /><br />[xyz]&nbsp; &nbsp; &nbsp; 一个字符集。匹配在方括号之间的任何字符。<br />[^xyz]&nbsp; &nbsp; &nbsp; 一个否定的字符集。不匹配在方括号之间的任何字符。<br />d&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个数字字符。等价于[0-9]。<br />D&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个非数字字符。等价于[^0-9]。<br />f&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个换页字符。<br />n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个换行字符。<br />r&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个回车符字符。<br />s&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配任何空白的空格, 标签, 换页, 包括空格等等，但不匹配换行符。<br />S&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配任何非空白的字符，但不匹配换行符。<br />t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个标签TAB字符。<br />v&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个垂直的标签字符。<br />w&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配任何词语字符包括下划线。<br />W&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配任何非词语字符字符。<br /><br />注： ^ 是实际字符 ^不是Ctl + 键值。<br /><br /><br />例如：<br />m.n&nbsp; &nbsp; &nbsp; 匹配 "man","men","min" 但不匹配 "moon".<br />t+t&nbsp; &nbsp; &nbsp; 匹配 "test","tonight" 和 "tea time" (the "tea t" portion) 但不匹配 "tea<br />time" (newline between "tea " and "time").<br />Te*st&nbsp; &nbsp; 匹配 "test","teest"," teeeest "等等。但是不匹配 "tst"。<br />[aeiou]&nbsp; 匹配每个小写元音。<br />[,.?]&nbsp; &nbsp; 匹配一文字的 ","，"."或 "?"。<br />[0-9,a-z] 匹配任何数位，或小写字母。<br />[^0-9]&nbsp; &nbsp; 除了数字以外匹配任何字符 (~ 意味着"不")<br /><br /><br />你按如下方式可以查找一个表达式A或 B ：<br /><br />"(John)|(Tom)"<br /><br />这将在找John或Tom的出现。应该在 2 个表达式之间没有任何东西。<br /><br />你可以在同一搜索中按如下方式组合A or B and C or D：<br /><br />"(John|Tom) (Smith|Jones)"<br /><br />这将在John or Tom 后面找 Smith or Jones。<br /><br /><br />另外：<br /><br />p&nbsp; &nbsp; &nbsp; &nbsp; 匹配 CR/LF ( 作为 rn 的一样 ) 作为DOS行结束符匹配<br /><br />如果查找/替换功能中正则表达式没有选用，则替换字段中下列字符也是有效的：<br /><br />符号&nbsp; 功能<br /><br />^^&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个 "^" 字符<br />^s&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 替换为被选择 ( 加亮 ) 活跃的文件窗口的文章。<br />^c&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 替换为剪贴板的内容<br />^b&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个页裂缝<br />^p&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个换行符 ( CR/LF )( 段 )( DOS 文件)<br />^r&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个换行符 ( CR 仅仅 )( 段 )( MAC 文件)<br />^n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个换行符 ( LF 仅仅 )( 段 )( UNIX 文件)<br />^t&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 匹配一个标签TAB字符</div></div><img src ="http://www.cppblog.com/ewre/aggbug/163683.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ewre/" target="_blank">ewre</a> 2012-01-06 09:20 <a href="http://www.cppblog.com/ewre/articles/163683.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从“一花一世界”说起</title><link>http://www.cppblog.com/ewre/articles/161132.html</link><dc:creator>ewre</dc:creator><author>ewre</author><pubDate>Tue, 29 Nov 2011 07:29:00 GMT</pubDate><guid>http://www.cppblog.com/ewre/articles/161132.html</guid><wfw:comment>http://www.cppblog.com/ewre/comments/161132.html</wfw:comment><comments>http://www.cppblog.com/ewre/articles/161132.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/ewre/comments/commentRss/161132.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/ewre/services/trackbacks/161132.html</trackback:ping><description><![CDATA[<div>佛谒里说：一花一世界，一树一菩提。<br /> 这里，我们只说一花一世界，不论一树一菩提。<br /> 物质世界是系统的，也就是有组织并且形成结构进而表现出一定层次的。<br /> 这个系统在层次上是无限的，因此，系统实现特定功能的机制也是无限复杂的。<br /> 人对于物质世界的具体认识是有限的，但是我们可以有&#8220;无限的物质世界&#8221;的概念在头脑里。<br /> 所以<br /> 不论你想事情，做事情，你都该：<br /> 先确定你要考虑的事情所涉及的物质系统的层次上的范围，你只在此范围内运筹帷幄，超出此范围，你不许要关心<br /> 其次要以合理的&#8220;粒度&#8221;去思考组织此范围之内的每一个对象，如果你不选定一个合理的&#8220;粒度&#8221;，你会发现，即使在此范围之内，事物仍然无限复杂，令你无从下手。<br /> 最后，因为物质世界系统上的无限复杂，认识论里说：<br /> 我们的认识永远不可能完全正确，只能趋向于正确。</div><img src ="http://www.cppblog.com/ewre/aggbug/161132.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ewre/" target="_blank">ewre</a> 2011-11-29 15:29 <a href="http://www.cppblog.com/ewre/articles/161132.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>OpenDrive-外联网盘</title><link>http://www.cppblog.com/ewre/articles/161125.html</link><dc:creator>ewre</dc:creator><author>ewre</author><pubDate>Tue, 29 Nov 2011 07:23:00 GMT</pubDate><guid>http://www.cppblog.com/ewre/articles/161125.html</guid><wfw:comment>http://www.cppblog.com/ewre/comments/161125.html</wfw:comment><comments>http://www.cppblog.com/ewre/articles/161125.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/ewre/comments/commentRss/161125.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/ewre/services/trackbacks/161125.html</trackback:ping><description><![CDATA[<div><p>最近发现一个不错的外联网盘<a target="_blank" href="https://www.opendrive.com/"><span style="color: #666666;">OpenDrive</span></a><span style="color: #666666;">，有兴趣的可以试一试</span></p></div><img src ="http://www.cppblog.com/ewre/aggbug/161125.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ewre/" target="_blank">ewre</a> 2011-11-29 15:23 <a href="http://www.cppblog.com/ewre/articles/161125.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>