Skip to content

Commit a519a46

Browse files
Update task.md
1 parent b5ee3bd commit a519a46

File tree

1 file changed

+5
-5
lines changed
  • 9-regular-expressions/08-regexp-character-sets-and-ranges/2-find-time-2-formats

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Find the time as hh:mm or hh-mm
1+
# Знайдіть часовий формат hh:mm або hh-mm
22

3-
The time can be in the format `hours:minutes` or `hours-minutes`. Both hours and minutes have 2 digits: `09:00` or `21-30`.
3+
Час можна записати у форматі `години:хвилини` or `години-хвилини`. В будь-яку з варіантів потрібні дві цифри на позначення годин і хвилин: `09:00` або `21-30`.
44

5-
Write a regexp to find time:
5+
Напишіть регулярний вираз для пошуку часового формату:
66

77
```js
88
let regexp = /your regexp/g;
9-
alert( "Breakfast at 09:00. Dinner at 21-30".match(regexp) ); // 09:00, 21-30
9+
alert( "Сніданок о 09:00. Вечеря о 21-30".match(regexp) ); // 09:00, 21-30
1010
```
1111

12-
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.
12+
P.S. В цій задачі ми завжди маємо коректний час, не потрібно перевіряти неіснуючі комбінації цифр, як-то "45:67". Пізніше ми роглянемо і такі випадки.

0 commit comments

Comments
 (0)