mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-01-13 01:44:12 +00:00
修复123解析 #123
This commit is contained in:
@@ -29,4 +29,20 @@ public class TestRegex {
|
||||
System.out.println(matcher.group(1));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testYeShareKey() {
|
||||
String url = "ABCD1234-asdasd";
|
||||
String shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||
System.out.println(shareKey);
|
||||
url = "ABCD1234-adasd.html";
|
||||
shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||
System.out.println(shareKey);
|
||||
url = "ABCD1234-adasd#123123";
|
||||
shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||
System.out.println(shareKey);
|
||||
url = "ABCD1234-adasd.html#123123";
|
||||
shareKey = url.replaceAll("(\\..*)|(#.*)", "");
|
||||
System.out.println(shareKey);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user