獲取URL的部分(Regex)給定URL(單行):http://test.example.com/dir/subdir/file.html如何使用正則表達式提取以下部分:子域(測試)域(example.com)沒有文件的路徑(/dir/subdir/)文件(file.html)文件的路徑(/dir/subdir/file.html)沒有路徑的URL(http://test.example.com)(添加您認為有用的任何其他內容)即使輸入以下URL,regex也應正確工作:http://example.example.com/example/example/example.html
- 3 回答
- 0 關注
- 521 瀏覽
添加回答
舉報
0/150
提交
取消