|
最近在整理代码,遇到个问题,打算把所有函数和过程声明中的Boolean参数改为ByVal方式。
尝试用正则表达式,没搞定,最后手动调的。请高手帮忙看看替换的正则表达式怎么写,分几步也可以。
示例文本如下:
Function Foo(v1 As Boolean, v, Optional v3 As Boolean = True, Optional ByVal cmpMethod As VbCompareMethod = vbTextCompare, Optional ByVal bStringLike As Boolean, Optional bShowWarning As Boolean = True) As Long
替换后:
Function Foo(ByVal v1 As Boolean, v, Optional ByVal v3 As Boolean = True, Optional ByVal cmpMethod As VbCompareMethod = vbTextCompare, Optional ByVal bStringLike As Boolean, Optional ByVal bShowWarning As Boolean = True) As Long
|
|