回答編集履歴
1
PHPで書いてたのでJava版に修正
test
CHANGED
@@ -1,8 +1,24 @@
|
|
1
|
-
```
|
1
|
+
```:java
|
2
2
|
|
3
|
-
|
3
|
+
public class Main {
|
4
4
|
|
5
|
+
public static void main(String[] args) throws Exception {
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
String dr = "content://com.estrongs.files/storage/emulated/0/file.pdf";
|
10
|
+
|
5
|
-
dr =
|
11
|
+
dr = dr.replaceFirst("(?<=/)[^/]*$", "これが一番速いと思います");
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
System.out.println(dr);
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
}
|
20
|
+
|
21
|
+
}
|
6
22
|
|
7
23
|
|
8
24
|
|