
Hidden Traps in Regular Expressions - CrditeJh_Lan
https://www.tutorialdocs.com/article/regex-trap.html
======
lixtra
TLDR: Poorly written regexp causes performance problems:

/^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~\\\\\\\/])+$/

instead of /(https?:.../i

I’m sure there exists proper java libraries to parse an URL.

------
knowsmorsecode
java.net.URL please.

