Hidden Traps in Regular Expressions Posted by CrditeJh_Lan on Friday August 03, 2018 @08:19AM from the tutorialdocs.com dept. https://www.tutorialdocs.com/article/regex-trap.html ( 2 comments | 2 points | on HN )
/^([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.