forked from javascript-tutorial/tr.javascript.info
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request javascript-tutorial#355 from cys27/master
Quantifiers +, *, ? and {n}
- Loading branch information
Showing
5 changed files
with
68 additions
and
69 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
9-regular-expressions/09-regexp-quantifiers/1-find-text-manydots/solution.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
Solution: | ||
Çözüm: | ||
|
||
```js run | ||
let regexp = /\.{3,}/g; | ||
alert( "Hello!... How goes?.....".match(regexp) ); // ..., ..... | ||
alert( "Merhaba!... Nasıl gidiyor?.....".match(regexp) ); // ..., ..... | ||
``` | ||
|
||
Please note that the dot is a special character, so we have to escape it and insert as `\.`. | ||
Lütfen noktanın özel bir karakter olduğunu unutmayın, bu yüzden `\.` ekleyerek ondan kurtulmamız gerekiyor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
9-regular-expressions/09-regexp-quantifiers/2-find-html-colors-6hex/task.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# Regexp for HTML colors | ||
# HTML renkler için düzenli ifade (regexp) | ||
|
||
Create a regexp to search HTML-colors written as `#ABCDEF`: first `#` and then 6 hexadecimal characters. | ||
`#ABCDEF` şeklinde yazılmış HTML-renklerini aramak için bir düzenli ifade oluşturun: önce `#` ve ardından 6 tane onaltılık karakter gelmesi lazım. | ||
|
||
An example of use: | ||
Bir kullanım örneği: | ||
|
||
```js | ||
let regexp = /...your regexp.../ | ||
let regexp = /...senin duzenli ifaden.../ | ||
|
||
let str = "color:#121212; background-color:#AA00ef bad-colors:f#fddee #fd2 #12345678"; | ||
|
||
alert( str.match(regexp) ) // #121212,#AA00ef | ||
``` | ||
|
||
P.S. In this task we do not need other color formats like `#123` or `rgb(1,2,3)` etc. | ||
NOT: Bu görevde `#123` veya `rgb(1,2,3)` vb. diğer renk formatlarına ihtiyacımız yoktur. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters