<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ### 一、元字符和修飾符 * 元字符:\ ^ $ . * + [a-z] \d \w {n, m}等 * 修飾符:如g i u等 ### 二、處理正則的方法 * test * match * exec * compile * search * replace * split 1、**test** 返回true/false ~~~ /a/.test('abc'); // true ~~~ 2、**match** 返回匹配結果 ~~~ 'abca'.match(/a/g); // ["a", "a"] ~~~ 3、**exec** 相當于match的非全局 ~~~ /a/g.exec('abca'); // ["a", index: 0, input: "abca"] ~~~ 4、**compile** 重新編譯規則 ~~~ var pattern = /a/; 'abca'.match(pattern); // ["a", index: 0, input: "abca"] pattern.compile(/a/g); 'abca'.match(pattern); // ["a", "a"] ~~~ 5、**search** 返回第一次匹配到的索引 ~~~ 'abca'.search(/(a)/); // 0 ~~~ 6、**replace** 匹配替換 ~~~ 'ab'.replace(/a/, 'c'); // cb 'ab'.replace(/(a)(b)/, '$2$1'); // ba ~~~ 7、**split** 匹配字符串分隔成數組 ~~~ 'a,v,c'.split(/,/); // ["a", "v", "c"] ~~~ **附加:** 獲取匹配字符串,多個規則用括號括起來,RegExp是掛在window上的一個方法 ~~~ /(a)(b)/.test('abc'); RegExp.$1 // a RegExp.$2 // b ~~~ 示例: sublime 批量替換 ~~~ import Login from '@/pages/login/index' ~~~ 選擇正則,是使用下面規則替換 ![](https://box.kancloud.cn/f32dc356274c2e379f55ae7747d949f7_463x72.jpg) 結果 ~~~ let Login = ()=>import('@/pages/login/index') ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看