您可以在Android中使用Uri类来完成此操作;
https://developer.android.com/reference/android/net/Uri.html
Uri uri = Uri.parse("http://www.chalklit.in/post.html?chapter=V-Maths-Addition%20&%20Subtraction&post=394");String server = uri.getAuthority();String path = uri.getPath();String protocol = uri.getScheme();Set<String> args = uri.getQueryParameterNames();这样,您甚至可以从查询参数中获取特定元素;
String chapter = uri.getQueryParameter("chapter"); //will return "V-Maths-Addition "


