I got a very long string that cointains querystrings and and some regular site urls in it. it looks something like
http://www.mysite.com/site/site?pageId=1234&otherId=4321
I would like to get just the http://www.mysite.com from this string. Im thinking maybe a regular expression could do the trick, but Im def not quilfied to write any of that 🙂 so could i get some help?
EDIT
i need a solution so i can pass url string and get the base url from that. Not my current Url
thanks guys, appreciate it as always.
Please try this:
You can check with this also: