Test, validate and match regular expressions
Matches the basic authentication (userinfo) segment at the start of a URL, capturing credentials like 'user:password@' or 'user@'. The username is one or more characters excluding :, @, /, #, and ?, while the ':password' portion is optional. Useful for extracting embedded credentials from URLs such as https://user:pass@example.com, or for validating/stripping the auth component before further URL processing.