chore(i18n,curriculum): update translations (#43746)
This commit is contained in:
@ -69,12 +69,14 @@ assert(
|
||||
你的正则表达式在`""`中不应该匹配到任何罪犯
|
||||
|
||||
```js
|
||||
reCriminals.lastIndex = 0;
|
||||
assert(!reCriminals.test(''));
|
||||
```
|
||||
|
||||
你的正则表达式在`P1P2P3`中不应该匹配到任何罪犯
|
||||
|
||||
```js
|
||||
reCriminals.lastIndex = 0;
|
||||
assert(!reCriminals.test('P1P2P3'));
|
||||
```
|
||||
|
||||
|
@ -23,60 +23,70 @@ dashedName: ignore-case-while-matching
|
||||
你的正则表达式应该匹配 `freeCodeCamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('freeCodeCamp'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配 `FreeCodeCamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FreeCodeCamp'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配 `FreecodeCamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FreecodeCamp'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配 `FreeCodecamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FreeCodecamp'));
|
||||
```
|
||||
|
||||
你的正则表达式不应该匹配 `Free Code Camp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(!fccRegex.test('Free Code Camp'));
|
||||
```
|
||||
|
||||
您的正则表达式应该匹配字符串 `FreeCOdeCamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FreeCOdeCamp'));
|
||||
```
|
||||
|
||||
你的正则表达式不应该匹配 `FCC`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(!fccRegex.test('FCC'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `FrEeCoDeCamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FrEeCoDeCamp'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `FrEeCodECamp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FrEeCodECamp'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `FReeCodeCAmp`
|
||||
|
||||
```js
|
||||
fccRegex.lastIndex = 0;
|
||||
assert(fccRegex.test('FReeCodeCAmp'));
|
||||
```
|
||||
|
||||
|
@ -25,42 +25,49 @@ dashedName: match-a-literal-string-with-different-possibilities
|
||||
对于字符串 `John has a pet dog.`,你的正则表达式`petRegex` 应该返回 `true`
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(petRegex.test('John has a pet dog.'));
|
||||
```
|
||||
|
||||
对于字符串 `Emma has a pet rock.`,你的正则表达式 `petRegex` 的应该返回 `false`
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(!petRegex.test('Emma has a pet rock.'));
|
||||
```
|
||||
|
||||
对于字符串 `Emma has a pet bird.`,你的正则表达式 `petRegex` 应该返回 `true`
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(petRegex.test('Emma has a pet bird.'));
|
||||
```
|
||||
|
||||
对于字符串 `Liz has a pet cat.`,你的正则表达式 `petRegex` 应该返回 `true`
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(petRegex.test('Liz has a pet cat.'));
|
||||
```
|
||||
|
||||
对于字符串 `Kara has a pet dolphin.`,你的正则表达式 `petRegex` 应该返回 `false`
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(!petRegex.test('Kara has a pet dolphin.'));
|
||||
```
|
||||
|
||||
对于字符串 `Alice has a pet fish.`,你的正则表达式 `petRegex` 应该返回 `true`。
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(petRegex.test('Alice has a pet fish.'));
|
||||
```
|
||||
|
||||
对于字符串 `Jimmy has a pet computer.`,你的正则表达式 `petRegex` 应该返回 `false`。
|
||||
|
||||
```js
|
||||
petRegex.lastIndex = 0;
|
||||
assert(!petRegex.test('Jimmy has a pet computer.'));
|
||||
```
|
||||
|
||||
|
@ -43,12 +43,14 @@ assert(calRegex.flags == '');
|
||||
你的正则表达式应该匹配字符串 `Cal` 的开始位置。
|
||||
|
||||
```js
|
||||
calRegex.lastIndex = 0;
|
||||
assert(calRegex.test('Cal and Ricky both like racing.'));
|
||||
```
|
||||
|
||||
你的正则表达式不应该匹配中间包含 `Cal` 的字符串。
|
||||
|
||||
```js
|
||||
calRegex.lastIndex = 0;
|
||||
assert(!calRegex.test('Ricky and Cal both like racing.'));
|
||||
```
|
||||
|
||||
|
@ -43,6 +43,7 @@ assert(lastRegex.flags == '');
|
||||
你应该在字符串 `The last car on a train is the caboose` 的末尾匹配 `caboose`。
|
||||
|
||||
```js
|
||||
lastRegex.lastIndex = 0;
|
||||
assert(lastRegex.test('The last car on a train is the caboose'));
|
||||
```
|
||||
|
||||
|
@ -38,12 +38,14 @@ wrongRegex.test(testStr);
|
||||
你的正则表达式 `waldoRegex` 应该匹配到 `Waldo`。
|
||||
|
||||
```js
|
||||
waldoRegex.lastIndex = 0;
|
||||
assert(waldoRegex.test(waldoIsHiding));
|
||||
```
|
||||
|
||||
你的正则表达式 `waldoRegex` 不应该搜寻其他的任何内容。
|
||||
|
||||
```js
|
||||
waldoRegex.lastIndex = 0;
|
||||
assert(!waldoRegex.test('Somewhere is hiding in this text.'));
|
||||
```
|
||||
|
||||
|
@ -52,48 +52,56 @@ assert(pwRegex.source.match(/\(\?=.*?\)\(\?=.*?\)/) !== null);
|
||||
您的正则表达式不应匹配字符串 `astronaut`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(!pwRegex.test('astronaut'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `banan1`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(!pwRegex.test('banan1'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `bana12`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(pwRegex.test('bana12'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `abc123`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(pwRegex.test('abc123'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `12345`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(!pwRegex.test('12345'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `8pass99`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(pwRegex.test('8pass99'));
|
||||
```
|
||||
|
||||
你的正表达式不应匹配字符串 `1a2bcde`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(!pwRegex.test('1a2bcde'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `astr1on11aut`
|
||||
|
||||
```js
|
||||
pwRegex.lastIndex = 0;
|
||||
assert(pwRegex.test('astr1on11aut'));
|
||||
```
|
||||
|
||||
|
@ -29,78 +29,91 @@ dashedName: restrict-possible-usernames
|
||||
你的正则表达式应该匹配字符串 `JACK`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(userCheck.test('JACK'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `J`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('J'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `Jo`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(userCheck.test('Jo'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `Oceans11`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(userCheck.test('Oceans11'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `RegexGuru`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(userCheck.test('RegexGuru'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `007`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('007'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `9`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('9'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `A1`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('A1'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `BadUs3rnam3`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('BadUs3rnam3'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `Z97`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(userCheck.test('Z97'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `c57bT3`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('c57bT3'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `AB1`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(userCheck.test('AB1'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `J%4`
|
||||
|
||||
```js
|
||||
userCheck.lastIndex = 0;
|
||||
assert(!userCheck.test('J%4'))
|
||||
```
|
||||
|
||||
|
@ -52,12 +52,14 @@ assert(reRegex.source.match(/\\1|\\2/g).length >= 2);
|
||||
你的正则表达式应该匹配字符串 `42 42 42`。
|
||||
|
||||
```js
|
||||
reRegex.lastIndex = 0;
|
||||
assert(reRegex.test('42 42 42'));
|
||||
```
|
||||
|
||||
你的正则表达式应该匹配字符串 `100 100 100`。
|
||||
|
||||
```js
|
||||
reRegex.lastIndex = 0;
|
||||
assert(reRegex.test('100 100 100'));
|
||||
```
|
||||
|
||||
@ -76,18 +78,21 @@ assert.equal('42 42'.match(reRegex.source), null);
|
||||
你的正则表达式不应该匹配字符串 `101 102 103`。
|
||||
|
||||
```js
|
||||
reRegex.lastIndex = 0;
|
||||
assert(!reRegex.test('101 102 103'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `1 2 3`。
|
||||
|
||||
```js
|
||||
reRegex.lastIndex = 0;
|
||||
assert(!reRegex.test('1 2 3'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `10 10 10`。
|
||||
|
||||
```js
|
||||
reRegex.lastIndex = 0;
|
||||
assert(reRegex.test('10 10 10'));
|
||||
```
|
||||
|
||||
|
@ -41,12 +41,14 @@ assert(haRegex.source.match(/{.*?}/).length > 0);
|
||||
你的正则表达式不应匹配字符串 `Hazzah`
|
||||
|
||||
```js
|
||||
haRegex.lastIndex = 0;
|
||||
assert(!haRegex.test('Hazzah'));
|
||||
```
|
||||
|
||||
你的正则表达式不应匹配字符串 `Hazzzah`
|
||||
|
||||
```js
|
||||
haRegex.lastIndex = 0;
|
||||
assert(!haRegex.test('Hazzzah'));
|
||||
```
|
||||
|
||||
|
@ -39,6 +39,7 @@ assert(ohRegex.source.match(/{.*?}/).length > 0);
|
||||
你的正则表达式不应匹配字符串 `Ohh no`
|
||||
|
||||
```js
|
||||
ohRegex.lastIndex = 0;
|
||||
assert(!ohRegex.test('Ohh no'));
|
||||
```
|
||||
|
||||
@ -69,6 +70,7 @@ assert('Ohhhhhh no'.match(ohRegex)[0].length === 10);
|
||||
你的正则表达式应该匹配字符串 `Ohhhhhhh no`
|
||||
|
||||
```js
|
||||
ohRegex.lastIndex = 0;
|
||||
assert(!ohRegex.test('Ohhhhhhh no'));
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user