我正在寻找一个正则表达式来检查URL是否是主页URL。
有效
http://example.com
https://example1.com
https://example2.com/
http://anything.com/?test=12
http://anything.com?test=12
无效
http://example.com/path
https://example.com/path1/path2
https://example.com/path1?test=123