At least it is better than COBOL. Wait. I guess that is a low bar. Hahaha. But to be real for a second, this does make me wonder what the high frequency traders are programming in. Maybe C for raw speed. So the next financial crisis might come to us courtesy of a buffer overflow.

This is a bad regex. Here are some valid URLs that this regex fails to match:

http://x.org

http://nic.science

http://名がドメイン.com (warning: this is a parked domain)

http://example.org/url,with,commas

https://en.wikipedia.org/wiki/Harry_Potter_(film_series)

http://127.0.0.1

http://[::1] (ipv6 loopback)

Here are some invalid URLs the regex is fine with:

http://exam..ple.org

http://–example.org

This answer has been revised 9 times on Stack Overflow, and this is the best
they could come up with. Go back and read the regex. Can you tell where each of
these bugs are? How long did it take you? If you received a bug report in your
application because one of these URLs was handled incorrectly, do you understand
this regex well enough to fix it? If your application has a URL regex, go find
it and see how it fares with these tests.

Complicated regexes are opaque, unmaintainable, and often wrong. The correct
approach to validating a URL is as follows:

For the final exam, you take a screenshot showing off all the work you've done in the class, and it has to survive being uploaded, thumbnailed, and re-screenshotted through a chain of social media sites.