forked from javascript-tutorial/bn.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#67 from msisaifu/sets-and-ranges
Sets and ranges
- Loading branch information
Showing
5 changed files
with
96 additions
and
96 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
...ular-expressions/08-regexp-character-sets-and-ranges/1-find-range-1/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
4 changes: 2 additions & 2 deletions
4
9-regular-expressions/08-regexp-character-sets-and-ranges/1-find-range-1/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,5 +1,5 @@ | ||
# Java[^script] | ||
|
||
We have a regexp `pattern:/Java[^script]/`. | ||
আমাদের এ ধরণের একটি প্যাটার্ন আছে `pattern:/Java[^script]/`। | ||
|
||
Does it match anything in the string `subject:Java`? In the string `subject:JavaScript`? | ||
এটি কি এই স্ট্রিংয়ের `subject:Java` সাথে ম্যাচ হবে? অথবা এই স্ট্রিংয়ের `subject:JavaScript`? |
4 changes: 2 additions & 2 deletions
4
...pressions/08-regexp-character-sets-and-ranges/2-find-time-2-formats/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,8 +1,8 @@ | ||
Answer: `pattern:\d\d[-:]\d\d`. | ||
উত্তর: `pattern:\d\d[-:]\d\d`. | ||
|
||
```js run | ||
let regexp = /\d\d[-:]\d\d/g; | ||
alert( "Breakfast at 09:00. Dinner at 21-30".match(regexp) ); // 09:00, 21-30 | ||
``` | ||
|
||
Please note that the dash `pattern:'-'` has a special meaning in square brackets, but only between other characters, not when it's in the beginning or at the end, so we don't need to escape it. | ||
দয়া করে মনে রাখা উচিত তৃতীয় বন্ধনীতে ড্যাশ `pattern:'-'` এর স্পেশাল অর্থ আছে, কিন্তু যদি দুটি ক্যারাক্টারের মাঝে ব্যবহার করি, কিন্তু শুরুতে অথবা শেষে ড্যাশ-ই বুঝায়, সুতরাং আমাদের এটি এস্কেপ করার প্রয়োজন নেই। |
8 changes: 4 additions & 4 deletions
8
...r-expressions/08-regexp-character-sets-and-ranges/2-find-time-2-formats/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,12 +1,12 @@ | ||
# Find the time as hh:mm or hh-mm | ||
# সময় খুঁজা hh:mm অথবা hh-mm | ||
|
||
The time can be in the format `hours:minutes` or `hours-minutes`. Both hours and minutes have 2 digits: `09:00` or `21-30`. | ||
সময়ের ফরম্যাট হতে পারে এভাবে `hours:minutes` অথবা `hours-minutes`. ঘন্টা এবং মিনিট উভয়েই দুই ডিজিটের হয়: `09:00` অথবা `21-30`. | ||
|
||
Write a regexp to find time: | ||
উপরোল্লিখিত ফরম্যাটে সময় খুঁজার জন্য প্যাটার্ন লিখুন: | ||
|
||
```js | ||
let regexp = /your regexp/g; | ||
alert( "Breakfast at 09:00. Dinner at 21-30".match(regexp) ); // 09:00, 21-30 | ||
``` | ||
|
||
P.S. In this task we assume that the time is always correct, there's no need to filter out bad strings like "45:67". Later we'll deal with that too. | ||
বি.দ্র. দুই ডিজিটের যেকোন সময় সঠিক হিসেবে বিবেচনা করতে পারি, আমাদের স্ট্রিং ভ্যালিডেশন নিয়ে চিন্তিত হতে হবে না যেমন "45:67"। পরবর্তীতে আমরা এটিও দেখব। |
Oops, something went wrong.