post processing on google urls

后端 未结 2 1273
挽巷
挽巷 2021-01-28 17:32

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.

2条回答
  •  暖寄归人
    2021-01-28 18:25

    I'd use parse_url and parse_str to achieve this rather than regular expressions.

    DEMO

提交回复
热议问题