How would I go about getting everything after the hostname in javascript?
So far this is the regex that I have but I now need to capture after starting with the first /
till the end of the string.
https?\:\/\/(.*)
String
http://www.myurl.com/en/country/belgium/
So for the string I need to capture:
/en/country/belgium/
I have been toying with this example even after reading up on regex if anybody could take a couple minutes to provide me with an example that would be really nice.
Edit
To be clear I am using document.referrer
here and to my knowledge this does not come with helpers like document.location
does.