I have a text column that has values such as this
<code> text2 (https://example.foo.com/url/path/site.js:1:44541)
text2 (https://example.foo.com/url/path/site.js:1:44541)
text2 https://example.foo.com/url/path/site.js:1:44541:1:25413)
text2 (https://exampel2.fooo.io/unique/bundle.js:2:172704)
text2 (ttps://exampel2.fooo.io/unique/bundle.js:2:173513)
text2 https://exampel2.fooo.io/unique/bundle.js:2:171673
text3 (https://exampel2.fooo.io/unique/bundle.js:2:171651)
</code>
<code> text2 (https://example.foo.com/url/path/site.js:1:44541)
text2 (https://example.foo.com/url/path/site.js:1:44541)
text2 https://example.foo.com/url/path/site.js:1:44541:1:25413)
text2 (https://exampel2.fooo.io/unique/bundle.js:2:172704)
text2 (ttps://exampel2.fooo.io/unique/bundle.js:2:173513)
text2 https://exampel2.fooo.io/unique/bundle.js:2:171673
text3 (https://exampel2.fooo.io/unique/bundle.js:2:171651)
</code>
text2 (https://example.foo.com/url/path/site.js:1:44541)
text2 (https://example.foo.com/url/path/site.js:1:44541)
text2 https://example.foo.com/url/path/site.js:1:44541:1:25413)
text2 (https://exampel2.fooo.io/unique/bundle.js:2:172704)
text2 (ttps://exampel2.fooo.io/unique/bundle.js:2:173513)
text2 https://exampel2.fooo.io/unique/bundle.js:2:171673
text3 (https://exampel2.fooo.io/unique/bundle.js:2:171651)
I’m trying to extrapolate only the hostname and pathname from the above such that I’m left with:
<code>https://example.foo.com/url/path/site.js
https://exampel2.fooo.io/unique/bundle.js
</code>
<code>https://example.foo.com/url/path/site.js
https://exampel2.fooo.io/unique/bundle.js
</code>
https://example.foo.com/url/path/site.js
https://exampel2.fooo.io/unique/bundle.js
I haven’t been able to find or create a regex for precisely what I need. Any help would be appreciated.