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. π
π LICENSE and COPYRIGHT π
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:
- The Perl Artistic License. See the file
COPYRIGHT.AL. - The Perl Artistic License 2.0. See the file
COPYRIGHT.AL2. - The BSD License. See the file
COPYRIGHT.BSD. - 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
- opensuse-leap 16.0: perl-Regexp-Common 2024080801.0.0-160000.2.2 Β· Artistic-1.0 OR Artistic-2.0 OR BSD-3-Clause OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms