给定URL (单行):
http://test.example.com/dir/subdir/file.html
如何使用正则表达式提取以下部分:
测试子域(测试) (example.com)
即使我输入以下URL,正则表达式也应该正常工作:
http://example.example.com/example/example/example.html
https://stackoverflow.com/questions/27745
相似问题