Been experimenting with the regex step and although I can match and remove elements of a string, a url in this case, I’d like to match and keep.
Is there any easy way of doing this?
I’ll admit regex is my weak point.
I’m validating urls and trying to remove all sub domains and just leave the root domain and tld. I’ve not been able to find or compose any regex that will match potentially multiple sub domains on all tlds.
I’ve only been able to get regex working that will match all domains. Hence my thinking…