mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
docs(regex)
This commit is contained in:
parent
11f7f679c7
commit
d4501ea2ca
@ -546,7 +546,7 @@ let re = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/u;
|
|||||||
capture2, // 第二个组匹配 01
|
capture2, // 第二个组匹配 01
|
||||||
capture3, // 第三个组匹配 02
|
capture3, // 第三个组匹配 02
|
||||||
position, // 匹配开始的位置 0
|
position, // 匹配开始的位置 0
|
||||||
S, // 原字符串 2015-01-05
|
S, // 原字符串 2015-01-02
|
||||||
groups // 具名组构成的一个对象 {year, month, day}
|
groups // 具名组构成的一个对象 {year, month, day}
|
||||||
) => {
|
) => {
|
||||||
let {day, month, year} = args[args.length - 1];
|
let {day, month, year} = args[args.length - 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user