Skip to content

Commit dc5a969

Browse files
translate until line-70
1 parent ed1de22 commit dc5a969

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • 9-regular-expressions/02-regexp-character-classes

9-regular-expressions/02-regexp-character-classes/article.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ alert( str.match(regexp).join('') ); // 79031234567
3737

3838
بیشترین استفاده ها عبارتند از:
3939

40-
`pattern:\d` ("d" is from "digit")
41-
: A digit: a character from `0` to `9`.
40+
`pattern:\d` ("d" مخفف "digit(رقم)")
41+
: رقم: کاراکتری از `0` تا `9`.
4242

43-
`pattern:\s` ("s" is from "space")
44-
: A space symbol: includes spaces, tabs `\t`, newlines `\n` and few other rare characters, such as `\v`, `\f` and `\r`.
43+
`pattern:\s` ("s" مخفف "space(فاصله)")
44+
: یک علامت فاصله: شامل فاصله‌ها، تب ها `t\`، خطوط جدید `n\` و چند کاراکتر کمیاب دیگر، مانند `v\`، `f\` و `r\`.
4545

4646
`pattern:\w` ("w" is from "word")
47-
: A "wordly" character: either a letter of Latin alphabet or a digit or an underscore `_`. Non-Latin letters (like cyrillic or hindi) do not belong to `pattern:\w`.
47+
: یک کاراکتر "کلمه ای": یا یک حرف الفبای لاتین یا یک رقم یا زیرخط `_`. حروف غیر لاتین (مانند سیریلیک یا هندی) به `pattern:\w` تعلق ندارند.
4848

49-
For instance, `pattern:\d\s\w` means a "digit" followed by a "space character" followed by a "wordly character", such as `match:1 a`.
49+
به عنوان مثال، `pattern:\d\s\w` به معنای یک `رقم` است که به دنبال آن یک `کاراکتر فاصله` و به دنبال آن یک `کاراکتر واژه‌ای` مانند `match:1 a`.
5050

51-
**A regexp may contain both regular symbols and character classes.**
51+
**یک regexp ممکن است شامل نمادهای معمولی و کلاس های کاراکتر باشد.**
5252

53-
For instance, `pattern:CSS\d` matches a string `match:CSS` with a digit after it:
53+
برای مثال، `pattern:CSS\d` با رشته `Match:CSS` با یک رقم بعد از آن مطابقت دارد:
5454

5555
```js run
5656
let str = "Is there CSS4?";
@@ -59,13 +59,13 @@ let regexp = /CSS\d/
5959
alert( str.match(regexp) ); // CSS4
6060
```
6161

62-
Also we can use many character classes:
62+
همچنین می توانیم از بسیاری از کلاس های کاراکتر استفاده کنیم:
6363

6464
```js run
6565
alert( "I love HTML5!".match(/\s\w\w\w\w\d/) ); // ' HTML5'
6666
```
6767

68-
The match (each regexp character class has the corresponding result character):
68+
مطابقت (هر کلاس کاراکتر regexp دارای کاراکتر نتیجه مربوطه است):
6969

7070
![](love-html5-classes.svg)
7171

0 commit comments

Comments
 (0)