Comment

Comment by dailygrind___

I think Regex is too low-level and a problem worth abstracting. It works fine with simple patterns but I don't really see how a pattern like this:

/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_])?\??(?:[-\+=&;%@.\w_])#?(?:[\w]*))?)/

(https://stackoverflow.com/questions/161738/what-is-the-best-...)

contributes to readability.

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton