I'm sure the check (if implemented) wouldn't be a naive regex that would fail that easily
The example regex would fail on that url. More generally I was trying to suggest with an example that filtering credible information with a regex is error prone.
Yes, and the example was naive. It’s trivial to make regex identify TLDs.
Yeah, but that doesn't work either. There are gov sites that have incorrect information, out of date information, partisan ideas and rhetoric, or there may exist, now or in the future, a .gov website where people could upload and share content.
On the domain only.
If you were going to check for this and didn’t immediately reach for location.host rather than location.href then it might be time to read some API docs.