質問するログイン新規登録

質問編集履歴

1

追記

2020/06/01 08:01

投稿

sdfgdfgh
sdfgdfgh

スコア2

title CHANGED
File without changes
body CHANGED
@@ -4,7 +4,7 @@
4
4
  どのように正規表現を変更すればよいのでしょうか?
5
5
 
6
6
  ```javascript
7
- const hourMinExp = /([01][1-9]|[1][0-9]|[2][0-4]|[1-9])[:時]([01][1-9]|[2-5][0-9]|[1-9])/;
7
+ const hourMinExp = /([01][1-9]|[1][0-9]|[2][0-4]|[1-9])[:時]([01][0-9]|[2-5][0-9]|[1-9])/;
8
8
  const user12Message = "12時"
9
9
  const matched21 = user12Message.match(hourMinExp);
10
10
  console.log(matched21);
@@ -13,4 +13,8 @@
13
13
  const sasas = a + d
14
14
  console.log(("0" + a).slice(-2));
15
15
  console.log(sasas);
16
- ```
16
+ ```
17
+
18
+ 01:10
19
+ 1:00
20
+ のように幅広く通るようにしています。