質問編集履歴

1

初心者マークの追加

2022/06/16 08:04

投稿

bigbro_purin
bigbro_purin

スコア2

test CHANGED
File without changes
test CHANGED
@@ -7,8 +7,7 @@
7
7
 
8
8
  ```GAS
9
9
  function code_03(){
10
- // let str = code_02(test_str);
10
+ // テスト用変数
11
-
12
11
  let test_1 = "平成500年9月19日"
13
12
  let test_2 = "令和30年9月19日"
14
13
  let test_3 = "昭和1年9月19日"
@@ -24,7 +23,7 @@
24
23
  }
25
24
  let date = (/年|月|日/gi);
26
25
 
27
-
26
+ //以下のtest_1の部分を変更
28
27
  let result = test_1.match(/[明治|大正|昭和|平成|令和].*?年/gi).join();
29
28
 
30
29
  let nengo = result.slice(0,2);