Comment

Comment by tomp

Is it just me or does this seem like a very bad idea? I mean it seems nicer but the reality is, if you don't know how Regexes work, you won't understand the nuances of the "verbal" regex either... Also, some optimisation maybe?

    ^(?:http)(?:s)?(?:\:\/\/)(?:www\.)?(?:[^\ ]*)$
could be better written as

    ^https?://(?:www[.])?[^ ]*$
Or am I missing something? In that case, I'll readily admit this library is a good idea :)
parent tomp 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton