diff --git "a/47\346\233\276\345\276\267\346\243\256/2022-11-16-\346\255\243\345\210\231\345\222\214\345\274\202\345\270\270/.keep" "b/47\346\233\276\345\276\267\346\243\256/2022-11-16-\346\255\243\345\210\231\345\222\214\345\274\202\345\270\270/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/47\346\233\276\345\276\267\346\243\256/2022-11-16-\346\255\243\345\210\231\345\222\214\345\274\202\345\270\270/\347\254\224\350\256\260.md" "b/47\346\233\276\345\276\267\346\243\256/2022-11-16-\346\255\243\345\210\231\345\222\214\345\274\202\345\270\270/\347\254\224\350\256\260.md" new file mode 100644 index 0000000000000000000000000000000000000000..34f245bc9429c285616896530a1faa01671ed871 --- /dev/null +++ "b/47\346\233\276\345\276\267\346\243\256/2022-11-16-\346\255\243\345\210\231\345\222\214\345\274\202\345\270\270/\347\254\224\350\256\260.md" @@ -0,0 +1,89 @@ +## 正则,异常 + +`console.log(/(\d{4})-(/d{2})-(/d{2})/.exec('2022-11-16'))` + +`// 2022-11-16 2022 11 16` + + `$1 $2 $3` + +`console.log(RegExp.$1);` //2022 捕获数组 + +`console.log(RegExp.$2);` //11 + +`console.log(RegExp.$3);` //16 + + + +//使用replace分组捕获 + +//引用子表达式的内容 + +`console.log(/(aabc)(ccab)\1,\2/.exec('aabcccabaabcccab'));` + +`//1:aabc 2:ccab` + +//反捕获:?::将捕获到的子表达式隐藏 + +`console.log(/(?:aabc)(ccba)/.exec('aabcccabaabcccab'));` + +`//1: 2:ccab` + +// ?: :紧跟着 ?!:不紧跟着 ?::反捕获 ??:非贪婪(有0取0没0取1) + +//查紧跟着c后面的b + +`console.log(/b(?=c)/.exec(‘abc’));` //查b(由c紧跟着) + +//查a(后面跟的不是b) + +`console.log(/a(?!b)/.exec('abca'));` + + + +#### 异常 + +//异常处理 + +`try{` //尝试捕获异常,里面放的式可能出错的代码 + + `const fn=function(){` + + `const data=null;` + + `return data;` + +`};` + + `const data=fn();` + +`};` + + + +//包装类:null undefined 没有包装类 + + `console.log(data.name);` //报错 + + `console.log('try');` + + + +`catch(error){` + + `console.log(error.message);` //对捕获到的错误进行一些处理 + + `console.log('catch')` + +`}` + + + +`finally{` + + `console.log('this is finally');` //不管有没有捕获错误,等会执行finally中的代码 + +`}` + + + +//try 每次只能捕获一个异常,报错之后的代码中止执行 \ No newline at end of file diff --git "a/47\346\233\276\345\276\267\346\243\256/2022-11-17-\346\265\217\350\247\210\345\231\250\345\257\271\350\261\241\346\250\241\345\236\213/.keep" "b/47\346\233\276\345\276\267\346\243\256/2022-11-17-\346\265\217\350\247\210\345\231\250\345\257\271\350\261\241\346\250\241\345\236\213/.keep" new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git "a/47\346\233\276\345\276\267\346\243\256/2022-11-17-\346\265\217\350\247\210\345\231\250\345\257\271\350\261\241\346\250\241\345\236\213/\344\275\234\344\270\232.html" "b/47\346\233\276\345\276\267\346\243\256/2022-11-17-\346\265\217\350\247\210\345\231\250\345\257\271\350\261\241\346\250\241\345\236\213/\344\275\234\344\270\232.html" new file mode 100644 index 0000000000000000000000000000000000000000..d2cb3498b0e39a505a27fedfd757b62faeabdcd0 --- /dev/null +++ "b/47\346\233\276\345\276\267\346\243\256/2022-11-17-\346\265\217\350\247\210\345\231\250\345\257\271\350\261\241\346\250\241\345\236\213/\344\275\234\344\270\232.html" @@ -0,0 +1,124 @@ + + +
+ + + +| 郑玮喆 | +庄云 | +廖治先 | +郑文源 | +戴俊锋 | +陈昊童 | +谢金金 | +占志新 | +张淑芳 | +刘永潘 | +廖柏成 | +
| 郑宗帅 | +李韦峰 | +吴欣燕 | +陈梅香 | +陈立智 | +袁贵森 | +赵浩敏 | +林世涛 | +罗启恒 | +卢国建 | +黄柱菘 | +
| 陈鹏 | +张耀仁 | +陈华伟 | +张正豪 | +韦仲晓 | +黄富贵 | +陆建锋 | +曾德森 | +吴文龙 | +陆利群 | +黄雄 | +
| 王世财 | +张先杰 | +胡基耀 | +马鑫涛 | +李涛 | +杨凌翔 | +罗此东 | +唐皓颖 | +白婉婷 | +