以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助]不能查找换行  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=127039)

--  作者:OKK
--  发布时间:2018/11/3 17:07:00
--  [求助]不能查找换行

以下是随便一段网页源码

随便复制一段网页源码过来狐表

然后批量修改

在每行的前面加 sb.AppendLine("

在每行的后面加“)

 

我试用了替换 vbcrlf ,但不行,无法找到 vbcrlf

 

请问有什么办法可以批量修改每行的前缀和后缀???

 

If(result) unb = unescape(unescape(result[1])).charCodeAt();
    Components = [];
    Function getBase(path) {
        If (typeof path === \'object\') {
            path = path[env] || path[PUB];
        }
        var host = isDaily ? DAILY_ASSETS_HOST : PUBLISH_ASSETS_HOST;
        Return host + path;
    }
    Config = {
        packages: {
            tbc: {
                base: getBase(\'tbc/\'),
                ignorePackageNameInUri: True
            },
            tb: {
                base: getBase(\'tb/\'),
                ignorePackageNameInUri: true
            },
            kg: {
                base: getBase(\'kg/\'),
                ignorePackageNameInUri: true
            },
            cm: {
                base: getBase(\'cm/\'),
                ignorePackageNameInUri: true
            },
            \'sd/data_sufei\': {
                base: getBase(\'sd/data_sufei/1.3.6/sufei\'),
                ignorePackageNameInUri: true
            },
            \'tb-mod\': {
                base: getBase(\'tb-mod/\'),
                ignorePackageNameInUri: true
            }
        },
        modules: {
            datalazyload: {
                alias: [\'kg/datalazyload/2.0.2/\']
            },
            \'gallery/datalazyload/1.0.1/\': {
                alias: [\'kg/datalazyload/2.0.2/\']
            },
            \'gallery/datalazyload/1.0/\': {
                alias: [\'kg/datalazyload/2.0.2/\']
            },
            switchable: {
                alias: [\'kg/switchable/2.0.0/\']
            },
            imagezoom: {
                alias: [\'kg/imagezoom/2.0.1/\']
            },
            kscroll: {
                alias: [\'gallery/kscroll/1.1/\']
            },
            rainlib: {
                alias: [\'gallery/rainlib/1.0/\']
            },
            log: {
                alias: [\'tbc/log/\']
            },
            sku: {
                alias: [\'kg/sku/6.2.0/\']
            },
            doctor: {
                alias: [\'kg/doctor/0.0.1/\']
            },
            shortcuts: {
                alias: [\'tbc/shortcuts/0.1.0/\']
            },
            slide: {
                alias: [\'kg/slide/2.0.2/\']
            },
            seckill: {
                alias: [\'tb/item-seckill/0.0.7/\']
            },
            \'address-detail/wlroute\': {
                requires: ["node", "io", "xtemplate", "overlay", "event", "address-detail/wlroute.css"]
            },
            \'records\':{
                alias: [\'tb/item-records/0.0.4/\']
            },
            \'item-detail/index\': {
                requires: [
                    \'core\',
                    \'overlay\',
                    \'xtemplate\',
                    \'imagezoom\',
                    \'switchable\',
                    \'datalazyload\',
                    \'sku\',
                    \'log\'
                ]
            },
            util: {alias: "kg/kmd-adapter/0.1.5/util"},
            feature: {alias: "kg/kmd-adapter/0.1.5/feature"},
            "event-dom": {alias: "event"},
            "event-custom": {alias: "event"},
            "event-gesture": {alias: "event"}
        }
    };


--  作者:有点蓝
--  发布时间:2018/11/3 17:28:00
--  
Dim str As String  = "某源码" \'最好是从文件里读源码:http://www.foxtable.com/webhelp/scr/0344.htm
Dim sb As new StringBuilder
For Each s As String  = str.Replace(vbcr,"").Split(vblf)
    sb.AppendLine("sb.AppendLine(""" & s.Replace("""","""""") & """)")
Next
Output.Show(sb.ToString)

然后复制输出结果的内容

--  作者:OKK
--  发布时间:2018/11/3 17:55:00
--  
原来这样,明白了,谢谢了图片点击可在新窗口打开查看