Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

The answer: `pattern:\b\d\d:\d\d\b`.
μ •λ‹΅: `pattern:\b\d\d:\d\d\b`.

```js run
alert( "Breakfast at 09:00 in the room 123:456.".match( /\b\d\d:\d\d\b/ ) ); // 09:00
alert("Breakfast at 09:00 in the room 123:456.".match(/\b\d\d:\d\d\b/)); // 09:00
```
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Find the time
# μ‹œκ°„ μ°ΎκΈ°

The time has a format: `hours:minutes`. Both hours and minutes has two digits, like `09:00`.
μ‹œκ°„μ€ ν˜•μ‹μ„ κ°€μ§‘λ‹ˆλ‹€: `hours:minutes`. μ‹œκ°„κ³Ό 뢄은 λͺ¨λ‘ `09:00`κ³Ό 같이 두 자릿수λ₯Ό κ°€μ§‘λ‹ˆλ‹€.

Make a regexp to find time in the string: `subject:Breakfast at 09:00 in the room 123:456.`
λ¬Έμžμ—΄ λ‚΄μ—μ„œ μ‹œκ°„μ„ μ°ΎκΈ° μœ„ν•΄ μ •κ·œ ν‘œν˜„μ‹μ„ λ§Œλ“€μ–΄λ³΄μ„Έμš”: `subject:Breakfast at 09:00 in the room 123:456.`

P.S. In this task there's no need to check time correctness yet, so `25:99` can also be a valid result.
P.S. 이 κ³Όμ œμ—μ„œλŠ” 아직 μ‹œκ°„ 정확도λ₯Ό 확인할 ν•„μš”κ°€ μ—†μŠ΅λ‹ˆλ‹€, λ”°λΌμ„œ `25:99`도 μœ νš¨ν•œ κ²°κ³Όκ°€ 될 수 μžˆμŠ΅λ‹ˆλ‹€.

P.P.S. The regexp shouldn't match `123:456`.
P.P.S. μ •κ·œ ν‘œν˜„μ‹μ€ `123:456` κ³Ό κ°™μ§€ μ•Šμ•„μ•Ό ν•©λ‹ˆλ‹€.