Hi, I am very bad with regexes.
I need a regular expression that will reduce a url like this:
hxxp://example.com/somefolder/something/whatever
to its base:
hxxp://example.com
The two slashes after the http: complicate things. I know I could just remove the "http://" and add it again later, but as a learning experience, I would like to do this regex in a single line.
Thanks in advance
I need a regular expression that will reduce a url like this:
hxxp://example.com/somefolder/something/whatever
to its base:
hxxp://example.com
The two slashes after the http: complicate things. I know I could just remove the "http://" and add it again later, but as a learning experience, I would like to do this regex in a single line.
Thanks in advance
Comment