3. translated

This commit is contained in:
Michal Mrukowicz 2017-12-18 18:47:13 +01:00
parent a7004852c6
commit 39b1dfd349

View File

@ -338,10 +338,10 @@ po niej literę `e`.
### 2.8.2 Dolar ### 2.8.2 Dolar
Dollar `$` symbol is used to check if matching character is the last character Symbol dolara `$` używany jest do sprawdzenia czy dopasowywany znak jest ostatni
of the input string. For example, regular expression `(at\.)$` means: a w łańcuchu. Na przykład, wyrażenie regularne `(at\.)$` oznacza: małą literę `a`,
lowercase character `a`, followed by lowercase character `t`, followed by a `.` następującą po niej literę `t`, następującą po niej kropkę `.` i na dodatek
character and the matcher must be end of the string. dopasowanie musi być końcem łańcucha.
<pre> <pre>
"(at\.)" => The fat c<a href="#learn-regex"><strong>at.</strong></a> s<a href="#learn-regex"><strong>at.</strong></a> on the m<a href="#learn-regex"><strong>at.</strong></a> "(at\.)" => The fat c<a href="#learn-regex"><strong>at.</strong></a> s<a href="#learn-regex"><strong>at.</strong></a> on the m<a href="#learn-regex"><strong>at.</strong></a>
@ -355,21 +355,20 @@ character and the matcher must be end of the string.
[Przetestuj wyrażenie](https://regex101.com/r/t0AkOd/1) [Przetestuj wyrażenie](https://regex101.com/r/t0AkOd/1)
## 3. Shorthand Character Sets ## 3. Skróty
Regular expression provides shorthands for the commonly used character sets, W wyrażeniach regularnych znajdziemy także skróty dla popularnych zestawów znaków,
which offer convenient shorthands for commonly used regular expressions. The które ułatwiają pracę z wyrażeniami regularnymi. Skróty wyglądają następująco:
shorthand character sets are as follows:
|Shorthand|Description| |Skrót|Opis|
|:----:|----| |:----:|----|
|.|Any character except new line| |.|Każdy znak z wyjątkiem nowej linii|
|\w|Matches alphanumeric characters: `[a-zA-Z0-9_]`| |\w|Znaki alfanumeryczne: `[a-zA-Z0-9_]`|
|\W|Matches non-alphanumeric characters: `[^\w]`| |\W|Znaki nie alfanumeryczne: `[^\w]`|
|\d|Matches digit: `[0-9]`| |\d|Cyfry: `[0-9]`|
|\D|Matches non-digit: `[^\d]`| |\D|Nie cyfry: `[^\d]`|
|\s|Matches whitespace character: `[\t\n\f\r\p{Z}]`| |\s|Dowolny biały znak: `[\t\n\f\r\p{Z}]`|
|\S|Matches non-whitespace character: `[^\s]`| |\S|Każdy znak oprócz białych: `[^\s]`|
## 4. Lookaround ## 4. Lookaround
@ -383,7 +382,7 @@ which means: get all the numbers which contain `.` character and are preceded
by `$` character. Following are the lookarounds that are used in regular by `$` character. Following are the lookarounds that are used in regular
expressions: expressions:
|Symbol|Description| |Symbol|Opis|
|:----:|----| |:----:|----|
|?=|Positive Lookahead| |?=|Positive Lookahead|
|?!|Negative Lookahead| |?!|Negative Lookahead|