I'm currently struggling with finding a way to extract domain names in urls.
My strings
xyz.weam.com
we2.wal.com
abc.workwork.google.net
I would like it to look for (com|org|net) and take the string before the match including the match until it hits the first (.
) going backwards.
I have tried different combinations of lookbehind and positive lookahead but I was never able to make it stop at the right dot (.
).