RegExp 基础:模式、标志与常用方法 | JavaScript
本章覆盖:RegExp literal / constructor;g / i / m / s / u / y 等常见 flags;test / exec;String.match / matchAll / replace;捕获组与命名组;复杂正则需关注可读性与性能。
本章知识点
- RegExp literal / constructor
- g / i / m / s / u / y 等常见 flags
- test / exec
- String.match / matchAll / replace
- 捕获组与命名组
- 复杂正则需关注可读性与性能