## 学习

Characters / constructs Corresponding article
`\`, `.`, `\cX`, `\d`, `\D`, `\f`, `\n`, `\r`, `\s`, `\S`, `\t`, `\v`, `\w`, `\W`, `\0`, `\xhh`, `\uhhhh`, `\uhhhhh`, `[\b]` Character classes
`^`, `\$`, `x(?=y)`, `x(?!y)`, `(?<=y)x`, `(?<!y)x`, `\b`, `\B` Assertions
`(x)`, `(?:x)`, `(?<Name>x)`, `x y`,`[xyz]`,`[^xyz]`,`*Number*`
`*`, `+`, `?`, `x{*n*}`, `x{*n*,}`, `x{*n*,*m*}` Quantifiers
`\p{*UnicodeProperty*}`, `\P{*UnicodeProperty*}` Unicode property escapes

Characters 中文 Meaning
`x(?=y)` 先行断言 Lookahead assertion: (positive lookahead) Matches “x” only if “x” is followed by “y”. For example, /`Jack(?=Sprat)/` matches “Jack” only if it is followed by “Sprat”. `/Jack(?=Sprat
`x(?!y)` 正向否定查找(这个翻译的也不好，反正我不理解) Negative lookahead assertion: Matches “x” only if “x” is not followed by “y”. For example, `/\d+(?!\.)/` matches a number only if it is not followed by a decimal point. `/\d+(?!\.)/.exec('3.141')` matches “141” but not “3”.
`(?<=y)x` 后行断言 Lookbehind assertion: Matches “x” only if “x” is preceded by “y”. For example, `/(?<=Jack)Sprat/` matches “Sprat” only if it is preceded by “Jack”. `/(?<=Jack
`(?<!y)x` 反向否定查找 Negative lookbehind assertion: Matches “x” only if “x” is not preceded by “y”. For example, `/(?<!-)\d+/` matches a number only if it is not preceded by a minus sign. `/(?<!-)\d+/.exec('3')` matches “3”. `/(?<!-)\d+/.exec('-3')` match is not found because the number is preceded by the minus sign.

## 图型展示一下

https://regexper.com/不支持 lookbehind，就不展示了。