Can urls end with periods? If you remove one that ends with a period, then it could go wrong.
A quick search shows that the internet is full of people who disagree on the best way of ending a sentence with a URL.
Here's a regex to exclude the ending period though.
https://stackoverflow.com/questions/55768921/url-regex-that-skips-ending-periods
Discussion
Apparently browsers treat a period as a redirect. It's weird but valid.
https://stackoverflow.com/questions/7555553/can-period-be-part-of-the-path-part-of-an-url#7555609
https://nostr.com. (we’re using the Fully Qualified Domain Name)
Google has some style suggestions: https://developers.google.com/style/periods#periods-with-urls
Oh nice, great resource
FQDN always has a dot at the end.