From efdefa73c4d711f779b50481f1e84087933fc933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E4=BF=8A=E9=94=8B?= <95995809+zzzzzzz123000@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:46:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../\344\275\234\344\270\232/2022.11.16.html" | 33 ++++++++++++ .../\347\254\224\350\256\260/2022.11.16.md" | 52 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 "25\346\210\264\344\277\212\351\224\213/\344\275\234\344\270\232/2022.11.16.html" create mode 100644 "25\346\210\264\344\277\212\351\224\213/\347\254\224\350\256\260/2022.11.16.md" diff --git "a/25\346\210\264\344\277\212\351\224\213/\344\275\234\344\270\232/2022.11.16.html" "b/25\346\210\264\344\277\212\351\224\213/\344\275\234\344\270\232/2022.11.16.html" new file mode 100644 index 0000000..cbf9fb5 --- /dev/null +++ "b/25\346\210\264\344\277\212\351\224\213/\344\275\234\344\270\232/2022.11.16.html" @@ -0,0 +1,33 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git "a/25\346\210\264\344\277\212\351\224\213/\347\254\224\350\256\260/2022.11.16.md" "b/25\346\210\264\344\277\212\351\224\213/\347\254\224\350\256\260/2022.11.16.md" new file mode 100644 index 0000000..f90eb44 --- /dev/null +++ "b/25\346\210\264\344\277\212\351\224\213/\347\254\224\350\256\260/2022.11.16.md" @@ -0,0 +1,52 @@ +```javascript +{} {m,n}{m,}{m} + ++{1,} + +*{0,} + +?{0,1} + +贪婪模式:能多就多 + +非贪婪模式:在正则后加?,能少就少 + + ():分组与捕获 + + + +非捕获,反向引用 + +非捕获((?:exp)):能让捕获的分组隐藏 + + + + | 选择或关系; --分支;|| + +自左向右匹配,一旦匹配上 就不再回头 + + + + 断言 + +\b:单词边界 + +^:单词开头 + +$:单词结尾 + + 环视 + +a(?=b):仅跟着b的a,括号内的不匹配,注意:与非捕获区分 + +a(?!b):不仅跟着b的a + + 匹配模式 + + /g:全局匹配 + +/i:不区分大小写 + +/m:换行 +``` + -- Gitee