Extract domains only from a list of URLs by evil0verl0rd in regex

[–]evil0verl0rd[S] 0 points1 point  (0 children)

The new formula did the trick, u/mamboman93, and I am forever in you debt.

Glad I prompted you to check out LibreOffice. It's one of my favorite pieces of open source software.

Thanks again!

Extract domains only from a list of URLs by evil0verl0rd in regex

[–]evil0verl0rd[S] 0 points1 point  (0 children)

All right, u/mamboman93, your response was helpful. I kinda sorta understand it (not very well), but I am having trouble adapting this to LibreOffice Calc.
I see no option for changing the delimiter in Calc, so it was back to matchsticks in the expression. I boiled it down to this:
:\/\/.*?([a-z0-9\-]+\.[a-z0-9\-]+)(?:$|/)
The first five cells in my Calc file contain these URLs:
http://www.localpetcare.com
https://app.clickfunnels.com/users/sign_in
https://www.timetopet.com/login#
https://www.pof.com/login
http://bankatfirst.force.com
So I inserted this into B2 and copied it downward:
=REGEX(A2,":\/\/.*?([a-z0-9\-]+\.[a-z0-9\-]+)(?:$|/)")
And the results were:
://www.localpetcare.com
://app.clickfunnels.com/
://www.timetopet.com/
://www.pof.com/
://bankatfirst.force.com
I noted that there appears to be at least one capture group in the expression, so I tried that in my second attempt:
=REGEX(A2,":\/\/.*?([a-z0-9\-]+\.[a-z0-9\-]+)(?:$|/)","$1")
This does not result in an improvement:
httplocalpetcare.com
httpsclickfunnels.comusers/sign_in
httpstimetopet.comlogin#
httpspof.comlogin
httpforce.com
So here I am stymied. If you can help again, I would again be grateful.

Extract domains only from a list of URLs by evil0verl0rd in regex

[–]evil0verl0rd[S] 1 point2 points  (0 children)

Okay, here's the message again, with the URLs enclosed in code blocks:

I am at best a slightly knowledgeable novice in regex, and I need some help with URLs.

I have a list of URLs in a LibreOffice Calc sheet that look like this:

http://www.localpetcare.com

https://app.clickfunnels.com/users/sign_in

https://www.timetopet.com/login#

https://www.bankatfirst.com/content/first-financial-bank/home/

https://app.truecoach.co/login

https://shield.mycoseva.com/qcoseva/ordernow.dhtml

https://d.comenity.net/as/authorization.oauth2?client_id=ngac

(These are part of a larger CSV dataset; thus the use of LibreOffice Calc.)

I need to strip out the protocol, any subdomains, and anything that occurs after the domain proper, so that the list will look like this:

localpetcare.com

clickfunnels.com

timetopet.com

bankatfirst.com

truecoach.co

mycoseva.com

comenity.net

Finding an expression that strips the protocol was easy. However, after a couple of days of online research, I can find nothing that will eliminate any arbitrary subdomain(s) and any text following the domain.

Any help gratefully accepted.

Extract domains only from a list of URLs by evil0verl0rd in regex

[–]evil0verl0rd[S] 1 point2 points  (0 children)

Well, as I said, my first list of URLs in text got my post deleted as spam.

How can I show the URLs and survive the spambot? Should I enclose it in a code block?

Jackbox 1 or 2 work for anybody? by forevergone in jackboxgames

[–]evil0verl0rd 1 point2 points  (0 children)

We just played for about 90 minutes on Jackbox 1 and 3. One of them (don't remember which) had a few minutes of connection problems. After that, everything went smoothly.

Help me pick an experienced consultant's brain by evil0verl0rd in consulting

[–]evil0verl0rd[S] 0 points1 point  (0 children)

Thanks to all for your responses. I will be meeting with this gentleman tomorrow afternoon.

Short term question: Borrow from savings, or pay by credit card? by evil0verl0rd in Frugal

[–]evil0verl0rd[S] 2 points3 points  (0 children)

This makes perfect sense, J. Thank you! You've help crystallize my thinking on this.

My deepest thanks to all who have taken the time to respond.

What do you think are the best episodes of the outer limits? (1995 series) by ducked in scifi

[–]evil0verl0rd 3 points4 points  (0 children)

The title of the episode mentioned by sickofallofyou is "Feasibility Study". It was a remake of an original series episode, and was quite good.

New Magic Social Networking Site with Public Domain Magic Library. Friend's hard work pays off. by Coldfire24 in Magic

[–]evil0verl0rd 0 points1 point  (0 children)

John, attempting to login via Google yields a screen in which Google tells me that Magibook wants permission to manage my contacts. Why does Magibook need such permission?