VB6 替换多个字符(比如)之间的内容成空,子程序 f_RemoveQuotes(ByVal strCode$, ByVal strChar1$, ByVal strChar2$, Optional ByVal strChar3$ = ))新建From1(窗体),新建Command1(按钮CommandButton),代码:
运行结果:
HTML注释测试:
原始: Hello<!--comment-->World<!--another comment-->End
结果: HelloWorldEnd
括号测试:
原始: a(b)c(d)e
结果: ace
不匹配分隔符测试:
原始: start[123end
结果: start[123end
正常字符串测试:
原始: normal string without delimiters
结果: normal string without delimiters