给定URL(单行):http:
//test.example.com/dir/subdir/file.html
如何使用正则表达式提取以下部分:
即使我输入以下URL,正则表达式也应该正常工作:
http://example.example.com/example/example/example.html
Run Code Online (Sandbox Code Playgroud) 谁能告诉我HTTP URL的无效字符是什么,以及在Java中验证该字符的最佳方法。我正在寻找的是URL格式的URLString验证:http(s):// ip:port / URLString
提前致谢。