Return blank string if hash fragment is empty
Fix the regex to fetch host and hash fragment
Improve test cases
Add test cases