I have a list of URLs in an event action field, and need to extract only the domain name (without TLD) using Data studio:
https://example.com => example
https://www.example.com => example
https://subdomain.example.com => example
Managed to extract everything but the non www version with this:
REGEXP_EXTRACT(Event Action, '^[^.]+.([^.]+)')
Any ideas how extract the non www version as well? Appreciate any help.
![2]](https://gamingcommission.club/i.sstatic.net/CI1Z6.png)