(?i)\b((?:(?:[a-z][\w-]+:)?(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
You must log in or # to comment.
www
urlsLooks like an URL matcher of some sorts, not limited to HTTP. Kudos for handling parentheses as valid URL characters.
URLs can have newlines too
Also no encoded basic auth or raw ip addresses (not that a useful website would likely use raw ipv4 or 6 since that causes huge CORS and sometimes even DNS issues…)
/unlearn
It seems most browsers basically ignore them:
https://lemire.me/blog/2026/02/28/you-can-use-newline-characters-in-urls/
So probably not worth remembering anyway.
What. The. Fuck.





