Regexp:...RI::pop(3)

πŸ’… Regexp::Common::URI::pop β€” the POP URI pattern bestie πŸŽ€

okay so real talk, this is the Regexp::Common::URI::pop manual page, and it's literally here to hand you a regex for POP URIs ✨


🌸 NAME 🌸

Regexp::Common::URI::pop β€” Returns a pattern for POP URIs. Yes bestie, that's the whole job and it ate πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Like, here's how you'd actually use it in real life:

use Regexp::Common qw /URI/;

while (<>) {
    /$RE{URI}{POP}/       and  print "Contains a POP URI.\n";
}

So you pull in Regexp::Common with qw /URI/, then when you're looping through input, matching /$RE{URI}{POP}/ means you print Contains a POP URI. β€” iconic, no cap πŸ”₯


✨ DESCRIPTION ✨

πŸ’œ $RE{URI}{POP}

Returns a pattern that matches POP URIs, as defined by RFC 2384. POP URIs have the form:

"pop:" "//" [ user [ ";AUTH" ( "*" | auth_type ) ] "@" ]
              host [ ":" port ]

That's the shape of it, bestie β€” the user part and the ";AUTH" bit are optional (and the auth type after it can be a * or an auth_type), and the port at the end is optional too 🫢

Under {-keep}, the following are returned:

  • $1 β€” The complete URI.
  • $2 β€” The scheme.
  • $3 β€” The user, if given.
  • $4 β€” The authentication type, if given (could be a *).
  • $5 β€” The host.
  • $6 β€” The port, if given.

So like, six little capture besties, all lined up, all doing their thing 🌈


πŸŽ€ REFERENCES πŸŽ€

  • [RFC 2384] β€” Gellens, R.: POP URL Scheme. August 1998.

That's the source of truth, the moment, the main character document πŸ“„πŸ‘‘


🌟 SEE ALSO 🌟

Regexp::Common::URI for other supported URIs. Go check it out, there's a whole friend group of URI patterns over there πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Abigail. (regexp-common@abigail.freedom.nl).


πŸ’€ BUGS AND IRRITATIONS πŸ’€

Bound to be plenty.

Not me saying that β€” that's literally what the page says 😭 and honestly? relatable. But fr fr, that's the stated situation, so there you go.


This software is Copyright (c) 2001 - 2024, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:

  1. The Perl Artistic License. See the file COPYRIGHT.AL.
  2. The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.
  3. The BSD License. See the file COPYRIGHT.BSD.
  4. The MIT License. See the file COPYRIGHT.MIT.

Pick your fave, they're all valid, and every one of those COPYRIGHT.* files is out there waiting for you πŸŽ€


omg and just so you know where this whole vibe came from: this is perl v5.42.0, dated 2024-08-09, and the page itself is Regexp:...RI::pop(3) πŸ’…βœ¨ mwah, go forth and match some POP URIs, bestie πŸ¦‹

πŸ“¦ where this page comes from