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.
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.
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.