In a table, I have lists of full urls like :
https://www.example.com/page-1/product-x?utm-source=google
Objective : I want to extract the domain name part of the url only :
I was using this following formula :
=REGEXEXTRACT(A1;"^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n?]+)")
The regex is working fine when testing it :
https://www.example.com/
However in Google sheet, It displays like :
example.com
- Why the resutls are not the same for the identical regex ?
- How to correct it in google Sheet ?