加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Notepad++ 正则表达式替换 例子

发布时间:2020-12-14 00:41:14 所属栏目:百科 来源:网络整理
导读:例1: {和}分别代表{和} [^ {} ] 匹配 除了 {和}之外的一个字符 * 尽可能多得匹配它前面的那种字符,至少匹配0个 +尽可能多得匹配它前面的那种字符,至少匹配1个 这样合起来: {[^{}]*} 匹配最里层的花括号 http://docs.notepad-plus-plus.org/index

例1:

{和}分别代表{和}

[^ {} ]匹配 除了 {和}之外的一个字符

* 尽可能多得匹配它前面的那种字符,至少匹配0个
+尽可能多得匹配它前面的那种字符,至少匹配1个


这样合起来: {[^{}]*}匹配最里层的花括号

http://docs.notepad-plus-plus.org/index.php/Regular_Expressions


例2:

( ) 分别代表 ( 和 )

. 匹配任意一个字符


*?

Zero or more of the previous group,but minimally: the shortest matching string,rather than the longest string as with the "greedy"*operator. Thus,m.*?oapplied to the textmargin-bottom: 0;will matchmargin-bo,whereasm.*omargin-botto.

则 (typedef_.*?; 匹配(一次匹配一个)

(typedef_XXXFunctionPtr)GetProcAddress(DllHandle,"XXXFunction");

(typedef_YYYFunctionPtr)GetProcAddress(DllHandle,"YYYFunction");

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读