查看: 54  |  回复: 0
  VB6 替换多个字符(比如)之间的内容成空,子程序 f_RemoveQuotes(ByVal strCode$, ByVal strChar1$, ByVal
楼主
发表于 2025年12月2日 15:54

新建From1(窗体),新建Command1(按钮CommandButton),代码:

具体代码只能由VIP查看,请升级

运行结果:

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


您需要登录后才可以回帖 登录 | 立即注册
【本版规则】请勿发表违反国家法律的内容,否则会被冻结账号和删贴。
用户名: 立即注册
密码:
2020-2025 MaNongKu.com