How to extract the domain name | REGEX Formulas 82

Опубликовано: 10 Январь 2025
на канале: Google Workspace Tutorial
334
16

In this part, we are going to explore:
0:00 REGEX - How to extract the domain name?
Feel free to make your copy of this spreadsheet:
https://docs.google.com/spreadsheets/...

#GoogleForEducation #GoogleWorkspace #GoogleSheets

If you found this video helpful, give us an old like and share it with some people you think this could be helpful for. And if you're not already a subscriber, make sure to hit the subscribe button and also the notification bell to be notified every time a video is uploaded

Useful Link:
Ben Collins (Google Developer Expert & Data Analytics Instructor)
https://www.benlcollins.com/

Google Sheets training:
https://support.google.com/a/users/an...

The whole playlist link:
   • The most useful formulas - Google She...  

Follow us on Pinterest:
https://www.pinterest.it/GoogleWorksp...

Sound from Zapsplat.com

Apple logo
https://iconscout.com/contributors/pi...

Windows logo
https://pixabay.com/it/users/

Welcome back, Educators.
Our mission is to extract the domain name from these URLs.
A domain name may have letters, numbers, and a hyphen (-).
The hyphen shouldn't be at the start or the end of the domain name.
This pattern extracts the letters (lowercase and uppercase), numbers, and a hyphen (not at the start or the end).
"[A-z0-9]+-?[A-z0-9]+"
But it returns the first part of the URL (the scheme) and not the domain name.
It returns just this one.
To resolve that, we extract the first part and make it a non-capturing group.
This pattern extracts the first part of the URL if it exists, and with or without the SSL certificate.
"^[https//:www.]*"
And here is it.
Now, we make it a non-capturing group, and we add an empty group.
"(?:^[https//:www.]*)()"
Copy the pattern that extracts the domain name.
Then paste it between the parentheses.
"(?:^[https//:www.]*)([A-z0-9]+-?[A-z0-9]+)"
Copy the formula down, and we have done the mission.
See you soon in the next part of this lesson.
That’s it, have fun. Thanks for watching.
If you like the video, please give us a thumbs up.
And subscribe to our channel.