Skip to content

Commit ffac614

Browse files
translate flags part
1 parent cade212 commit ffac614

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

  • 9-regular-expressions/01-regexp-introduction

9-regular-expressions/01-regexp-introduction/article.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
عبارت باقاعده (همچنین "regexp"، یا فقط "reg") از یک *الگو(pattern)* و *پرچم(flags)* های اختیاری تشکیل شده است.
1010

11-
دو سینتکس وجود دارد که می توان از آنها برای ایجاد یک شیء عبارت باقاعده(Regular expression) استفاده کرد.
11+
دو سینتکس وجود دارد که می توان از آنها برای ایجاد یک شیء عبارت باقاعده استفاده کرد.
1212

1313
سینتکس "طولانی":
1414

@@ -37,32 +37,32 @@ let tag = prompt("چه بر چسبی می خواهید پیدا کنید؟", "h2
3737
let regexp = new RegExp(`<${tag}>`); // مانند /<h2>/ اگر در اعلان بالا "h2" پاسخ داده شود
3838
```
3939

40-
## Flags
40+
## پرچم ها (Flags)
4141

42-
Regular expressions may have flags that affect the search.
42+
عبارات باقاعده ممکن است دارای پرچم هایی باشند که بر جستجو تأثیر می گذارد.
4343

44-
There are only 6 of them in JavaScript:
44+
در جاوا اسکریپت، فقط 6 مورد از آنها وجود دارد:
4545

4646
`pattern:i`
47-
: With this flag the search is case-insensitive: no difference between `A` and `a` (see the example below).
47+
: با این پرچم، جستجو به حروف کوچک و بزرگ حساس نیست: تفاوتی بین `A` و `a` نمی گذارد (به مثال زیر مراجعه کنید).
4848

4949
`pattern:g`
50-
: With this flag the search looks for all matches, without it -- only the first match is returned.
50+
: با این پرچم، جستجو برای همه موارد منطبق، بدون آن - فقط اولین موردی که هم خوانی دارد، برگردانده می شود.
5151

5252
`pattern:m`
53-
: Multiline mode (covered in the chapter <info:regexp-multiline-mode>).
53+
: حالت چند خطی (در فصل <info:regexp-multiline-mode> پوشش داده شده است).
5454

5555
`pattern:s`
56-
: Enables "dotall" mode, that allows a dot `pattern:.` to match newline character `\n` (covered in the chapter <info:regexp-character-classes>).
56+
: حالت `dotall` را فعال می‌کند، که به یک نقطه `.:pattern` اجازه می‌دهد تا با کاراکتر خط جدید `n\` مطابقت داشته باشد (در فصل <info:regexp-character-classes> پوشش داده شده است).
5757

5858
`pattern:u`
59-
: Enables full Unicode support. The flag enables correct processing of surrogate pairs. More about that in the chapter <info:regexp-unicode>.
59+
: پشتیبانی کامل از یونیکد را فعال می کند. پرچم پردازش صحیح جفت های جایگزین را امکان پذیر می کند. اطلاعات بیشتر در مورد آن در فصل <info:regexp-unicode>.
6060

6161
`pattern:y`
62-
: "Sticky" mode: searching at the exact position in the text (covered in the chapter <info:regexp-sticky>)
62+
: حالت `Sticky`: جستجو در موقعیت دقیق متن (در فصل <info:regexp-sticky> پوشش داده شده است)
6363

6464
```smart header="Colors"
65-
From here on the color scheme is:
65+
از اینجا به بعد رنگ بندی به این صورت است:
6666
6767
- regexp -- `pattern:red`
6868
- string (where we search) -- `subject:blue`

0 commit comments

Comments
 (0)