zheng 16 giờ trước cách đây
mục cha
commit
b3bccbebf6

+ 3 - 1
20.webpack/webpack.config.js

@@ -44,7 +44,9 @@ module.exports = {
     ],
     // 关闭体积校验
     performance: {
-        hints: false
+        // hints: false
+        maxAssetSize: 10000000000,
+         maxEntrypointSize: 40000000000,
     },
     // 映射源码
     devtool: "inline-source-map"

+ 30 - 0
21.正则/1.认识正则表达式.html

@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+</head>
+
+<body>
+    <script>
+        const reg = /西游记/g;
+        var str = '西游记是四大名著之一,我爱看西游记';
+        console.log(reg.test(str));
+        console.log(reg.exec(str));
+        console.log(str.match(reg));
+        const str1 = str.replace(reg,'红楼梦');
+        console.log(str1);
+        /**
+         * 正则定义
+         * const reg<名字> = /需要校验的规则/
+         * 1.test() 匹配文本中是否包含校验的字符 返回布尔值
+         * 2.exec() 返回数组格式 查找符合条件的字符
+         * 3.match() 查找符合规则的字符并返回
+         * 4.replace() 替换
+        */
+    </script>
+</body>
+
+</html>

+ 18 - 0
21.正则/2.修饰符.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>Document</title>
+</head>
+<body>
+    <script>
+        // i 不区分大小写
+        // g 全局匹配
+        const reg = /an/gi;
+        console.log(reg.test('aaaAn'));
+        const str = 'an Apple,an Ant';
+        console.log(str.match(reg));
+    </script>
+</body>
+</html>