regex needed to strip out domain name

后端 未结 5 1045
终归单人心
终归单人心 2020-12-20 01:09

I need a regexp to strip out just the domain name part of a url. So for example if i had the following url:

http://www.website-2000.com

the bit I\'d want the

5条回答
  •  长情又很酷
    2020-12-20 02:12

    Let me introduce you this wonderful tool txt2re: regular expression generator

    Here you can experiment with regex and generate code in many languages.

提交回复
热议问题