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