随笔分类 -  正则

摘要:[_]{1,1}([a-z]) 替换 \U$1 参考: https://superuser.com/questions/312073/use-notepad-to-change-under-score-case-to-camelcase 阅读全文
posted @ 2021-03-29 20:33 wolbo 阅读(64) 评论(0) 推荐(0) 编辑
摘要:匹配函数大括号 跨行匹配 \t{((.|\n)*?)} 匹配函数名 怎么类名 (.+)\s(.+)\( 替换(visual studio) $1 classname::$2( 阅读全文
posted @ 2021-03-05 16:16 wolbo 阅读(386) 评论(0) 推荐(0) 编辑
摘要:1 使用match 不能加/g 否则无效 2 使用matchAll 需要先定义一个RegExp对象 const regexp = RegExp(/,"(.+)"\)/,'g'); const matches = str.matchAll(regexp); for (const match of ma 阅读全文
posted @ 2020-02-17 16:20 wolbo 阅读(457) 评论(0) 推荐(0) 编辑
摘要:1 正则贪婪模式 属于贪婪模式的量词,也叫做匹配优先量词,包括: “{m,n}”、“{m,}”、“?”、“*”和“+”。 非贪婪 “{m,n}?”、“{m,}?”、“??”、“*?”和“+?”。 2 notepad++ 匹配单个汉字 https://zhuanlan.zhihu.com/p/3333 阅读全文
posted @ 2019-08-14 17:03 wolbo 阅读(327) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示