diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md index 9f044bf161..3fbfbcd9b7 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md @@ -17,8 +17,8 @@ HTML 有一个特定的元素用于创建无序列表。 ```html ``` diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md index 63f2ee74ff..054a6f152b 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md @@ -13,7 +13,7 @@ dashedName: link-to-external-pages-with-anchor-elements `a` 需要一个 `href` 属性指向跳转的目的地。 同时,它还应有内容。 例如: -`链接到 freeCodeCamp` +`this links to freecodecamp.org` 在浏览器中,以上的标签会将文字 **"链接到 freeCodeCamp"** 展示成一个可点击的超链接。 点击该文本就会跳转到 **`https://freecodecamp.org`**。 diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md index 670b9b3dbd..ae630a2b99 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups.md @@ -8,13 +8,13 @@ dashedName: reuse-patterns-using-capture-groups # --description-- -一些你所搜寻的匹配模式会在字符串中出现多次,手动重复该正则表达式太浪费了。有一种更好的方法可以指定何时在字符串中会有多个重复的子字符串。 +一些你所搜寻的匹配模式会在字符串中出现多次, 手动重复该正则表达式显得不够简洁。 当字符串中出现多个重复子字符串时,有一种更好的方式来编写模式。 -可以使用`捕获组`搜寻重复的子字符串。括号`(`和`)`可以用来匹配重复的子字符串。只需要把重复匹配模式的正则表达式放在括号中即可。 +可以使用 捕获组 搜寻重复的子字符串。 括号 `(` 和 `)` 可以用来匹配重复的子字符串。 把需要重复匹配的模式放在括号中即可。 -要指定重复字符串将出现的位置,可以使用反斜杠(`\`)后接一个数字。这个数字从 1 开始,随着你使用的每个捕获组的增加而增加。这里有一个示例,`\1`可以匹配第一个组。 +要指定重复字符串将出现的位置,可以使用反斜杠(\\)后接一个数字。 这个数字从 1 开始,随着你使用的每个捕获组的增加而增加。 这里有一个示例,`\1`可以匹配第一个组。 -下面的示例匹配任意两个被空格分割的单词: +下面的示例展示的是匹配被空格隔开的两个相同单词: ```js let repeatStr = "regex regex"; @@ -23,27 +23,27 @@ repeatRegex.test(repeatStr); // Returns true repeatStr.match(repeatRegex); // Returns ["regex regex", "regex"] ``` -在字符串上使用`.match()`方法将返回一个数组,其中包含它匹配的字符串及其捕获组。 +在字符串上调用 `.match()` 方法将返回一个数组,其中包含它最终匹配到的字符串及其捕获组。 # --instructions-- -在正则表达式`reRegex`中使用`捕获组`,以匹配在字符串中仅重复三次的数字,每一个都由空格分隔。 +在正则表达式 `reRegex` 中使用捕获组,以匹配在字符串中被空格隔开的三个相同数字。 # --hints-- -你的正则表达式应该使用数字的速记元字符。 +你的正则表达式应该使用数字的简写字符类。 ```js assert(reRegex.source.match(/\\d/)); ``` -你的正则表达式应该重用两次捕获组。 +你的正则表达式应该使用两次捕获组。 ```js assert(reRegex.source.match(/\\1|\\2/g).length >= 2); ``` -你的正则表达式应该有两个空格分隔这三个数字。 +你的正则表达式应该有两个空格分隔三个数字。 ```js assert( @@ -52,43 +52,43 @@ assert( ); ``` -你的正则表达式应该匹配`'42 42 42'`。 +你的正则表达式应该匹配 `"42 42 42"`。 ```js assert(reRegex.test('42 42 42')); ``` -你的正则表达式应该匹配`'100 100 100'`。 +你的正则表达式应该匹配 `"100 100 100"`。 ```js assert(reRegex.test('100 100 100')); ``` -你的正则表达式不应该匹配`'42 42 42 42'`。 +你的正则表达式不应该匹配 `"42 42 42 42"`。 ```js assert.equal('42 42 42 42'.match(reRegex.source), null); ``` -你的正则表达式不应该匹配`'42 42'`。 +你的正则表达式不应该匹配 `"42 42"`。 ```js assert.equal('42 42'.match(reRegex.source), null); ``` -你的正则表达式不应该匹配`'101 102 103'`。 +你的正则表达式不应该匹配 `"101 102 103"`。 ```js assert(!reRegex.test('101 102 103')); ``` -你的正则表达式不应该匹配`'1 2 3'`。 +你的正则表达式不应该匹配 `"1 2 3"`。 ```js assert(!reRegex.test('1 2 3')); ``` -你的正则表达式应该匹配`'10 10 10'`。 +你的正则表达式应该匹配 `"10 10 10"`。 ```js assert(reRegex.test('10 10 10'));