回答編集履歴

1

追記

2017/06/07 05:24

投稿

KaiShoya
KaiShoya

スコア551

test CHANGED
@@ -27,3 +27,45 @@
27
27
  Path Path = Paths.get(args[0]);{
28
28
 
29
29
  ```
30
+
31
+
32
+
33
+ このreturnもおかしいです。
34
+
35
+ ```java
36
+
37
+ List<Integer> PriceExtraction (List<Integer> list){
38
+
39
+ List<Integer> PriceList = new ArrayList<Integer>();
40
+
41
+ for (int j = 0; j<list.size(); j++){
42
+
43
+ String regexPriceName = "\\d+";
44
+
45
+
46
+
47
+ Pattern pattrenPrice = Pattern.compile(regexPriceName);
48
+
49
+ Matcher matchPrice = pattrenPrice.matcher(list.get(j).toString());
50
+
51
+ if(matchPrice.find()){
52
+
53
+ PriceList.add(Integer.parseInt(matchPrice.group(1)));
54
+
55
+ }else{
56
+
57
+ PriceList.add(null);
58
+
59
+ System.err.println("抽出不可");
60
+
61
+ }
62
+
63
+
64
+
65
+ }
66
+
67
+
68
+
69
+ return PriceList;
70
+
71
+ ```