I have grabbed some urls from Google search results using a regular expression. It has provided me the links in the format given below. Now, I just want the scheme and the host.
I'd use parse_url and parse_str to achieve this rather than regular expressions.
DEMO