fix: update guide hint to properly declare regex (#34625)

This commit is contained in:
Fred Battle
2018-12-12 15:48:22 -08:00
committed by Jingyi Ding
parent da6972338f
commit cb2f76e1b2
6 changed files with 18 additions and 18 deletions

View File

@ -17,8 +17,8 @@ localeTitle: إعادة استخدام الأنماط باستخدام مجمو
إذا كنا سنترجم التعبير المعتاد حرفياً ، فسيبدو شيئًا كالتالي:
`let re = /(test)\s\1;
let literalRe = /test\stest;
`let re = /(test)\s\1/;
let literalRe = /test\stest/;
`
كل من `rea` و `literalRe` تطابق نفس الشيء.

View File

@ -19,8 +19,8 @@ let testString = "test test test ";
如果我们要正面翻译正则表达式,它看起来像这样:
```js
let re = /(test)\s\1;
let literalRe = /test\stest;
let re = /(test)\s\1/;
let literalRe = /test\stest/;
```
`rea``literalRe`都会匹配相同的东西。

View File

@ -12,11 +12,11 @@ let result = reRegex.test(testString);
```
`result` will match only `test test` because `\1` in this example stands for the same text as most recently matched by the 1st capturing group `(test)`.
If we were to lierally translate the regex, it would look something like this:
If we were to literally translate the regex, it would look something like this:
```js
let re = /(test)\s\1;
let literalRe = /test\stest;
let re = /(test)\s\1/;
let literalRe = /test\stest/;
```
Both `rea` and `literalRe` would match the same thing.

View File

@ -19,8 +19,8 @@ let testString = "test test test ";
Se fôssemos traduzir literalmente o regex, seria algo como isto:
```js
let re = /(test)\s\1;
let literalRe = /test\stest;
let re = /(test)\s\1/;
let literalRe = /test\stest/;
```
Ambos `rea` e `literalRe` combinariam com a mesma coisa.

View File

@ -19,8 +19,8 @@ let testString = "test test test ";
Если бы мы должны были перевести регулярное выражение, это выглядело бы примерно так:
```js
let re = /(test)\s\1;
let literalRe = /test\stest;
let re = /(test)\s\1/;
let literalRe = /test\stest/;
```
И `rea` и `literalRe` будут соответствовать одному и тому же.

View File

@ -19,8 +19,8 @@ let testString = "test test test ";
Si tuviéramos que traducir literalmente la expresión regular, se vería algo así:
```js
let re = /(test)\s\1;
let literalRe = /test\stest;
let re = /(test)\s\1/;
let literalRe = /test\stest/;
```
Tanto `rea` como `literalRe` coincidirían con la misma cosa.