Regexp:...::telnet(3)

πŸ’… NAME πŸ’…

Ok so bestie, Regexp::Common::URI::telnet β€” it returns a pattern for telnet URIs. That's it, that's the whole vibe. It's the telnet sub-module of the big Regexp::Common URI family (iykyk), and yes, it's a Perl thing, no cap. πŸŽ€


✨ SYNOPSIS ✨

Like, literally just use it:

use Regexp::Common qw /URI/;

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

That's the whole group chat transcript. πŸ’–


🌸 DESCRIPTION 🌸

πŸ¦‹ $RE{URI}{telnet}

This one returns a pattern that matches telnet URIs, as defined by RFC 1738. Fr fr, that's the spec it's following.

Telnet URIs have the form:

"telnet:" "//" [ user [ ":" password ] "@" ] host [ ":" port ] [ "/" ]

Look at that structure, the way it's bracketed β€” it's giving optional-everything main character energy. πŸ‘‘

Under {-keep}, the following are returned β€” and bestie, you're gonna want to screenshot this, because every capture group is doing its own little job:

  • $1 β€” The complete URI. The whole thing. The full look. ✨
  • $2 β€” The scheme.
  • $3 β€” The username:password combo, or just the username if there is no password.
  • $4 β€” The username, if given.
  • $5 β€” The password, if given.
  • $6 β€” The host:port combo, or just the host if there's no port.
  • $7 β€” The host.
  • $8 β€” The port, if given.
  • $9 β€” The trailing slash, if any.

Nine groups. Nine. She ate and left no crumbs. πŸ™ˆ


πŸ“š REFERENCES πŸ“š

  • [RFC 1738] β€” Berners-Lee, Tim, Masinter, L., McCahill, M.: Uniform Resource Locators (URL). December 1994. The ancient texts, lowkey iconic, still cited. πŸ›οΈ

πŸ’œ SEE ALSO πŸ’œ

  • Regexp::Common::URI β€” for other supported URIs. Go check on the rest of the family, they miss you. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Damian Conway (damian@conway.org) β€” yeah, that Damian Conway. Legend behavior. πŸ’…


πŸ”§ MAINTENANCE πŸ”§

This package is maintained by Abigail (regexp-common@abigail.freedom.nl). She's holding it down, keeping the vibes immaculate. πŸ’–


πŸ’€ BUGS AND IRRITATIONS πŸ’€

"Bound to be plenty."

That's it. That's the entire section. No elaboration, no list, no apology β€” just absolute raw honesty. The confidence. The audacity. Honestly? Respect. 😭


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 β€” pick your fighter:

  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.

Four licenses, all slay, all valid. Choose wisely bestie. ⭐


And that's a wrap! This page was brought to you by perl v5.42.0, dated 2024-08-09, for Regexp:...::telnet(3) β€” go forth and match those telnet URIs, you absolute icon. πŸ§šπŸ’œ

πŸ“¦ where this page comes from