I want to split the URL till sub directory if available else TLD, How to acheive this using Regex?
www.xyx.com/features.html => www.xyx.com/ to be selected and www.xyx.com/abc/features.html => www.xyx.com/abc/ to be selected
It includes https, http, www and non-www.
Any help appreciated!