in reply to Regex for matching URLs with username/password and token

It is mildly unclear to me whether you have a (curl or wget) command, or an https:// URL.

For Curl commands, see HTTP::Request::FromCurl for example, which parses a Curl (or Wget) command line.

For https:// URLs, see URI or Mojo::URL.

If you have concrete examples, please post them here together with your code in <code>...</code> tags, then we can give you more concrete advice.