Regexp:...RI::http(3)
π Regexp::Common::URI::http π
okay bestie, welcome to the Regexp:...RI::http(3) page from User Contributed Perl Documentation β¨ this one is literally all about returning a pattern for HTTP URIs, and it's giving very useful regex energy π
πΈ NAME πΈ
Regexp::Common::URI::http -- Returns a pattern for HTTP URIs.
β¨ SYNOPSIS β¨
use Regexp::Common qw /URI/;
while (<>) {
/$RE{URI}{HTTP}/ and print "Contains an HTTP URI.\n";
}
π¦ DESCRIPTION π¦
$RE{URI}{HTTP}{-scheme}
This provides a regex for an HTTP URI as defined by RFC 2396 (generic syntax) and RFC 2616 (HTTP). no cap, that's the whole vibe π
If -scheme => P is specified the pattern P is used as the scheme. By default P is qr/http/. https and https? are reasonable alternatives.
The syntax for an HTTP URI is:
"http:" "//" host [ ":" port ] [ "/" path [ "?" query ]]
Under {-keep}, the following are returned:
$1β The entire URI. π$2β The scheme.$3β The host (name or address).$4β The port (if any).$5β The absolute path, including the query and leading slash.$6β The absolute path, including the query, without the leading slash.$7β The absolute path, without the query or leading slash.$8β The query, without the question mark.
π REFERENCES π
[RFC 2396]
Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998.
[RFC 2616]
Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P. and Berners-Lee, Tim: Hypertext Transfer Protocol -- HTTP/1.1. June 1999.
π SEE ALSO π
Regexp::Common::URI for other supported URIs.
π AUTHOR π
Damian Conway (damian@conway.org) π
π οΈ MAINTENANCE π οΈ
This package is maintained by Abigail (regexp-common@abigail.freedom.nl).
π BUGS AND IRRITATIONS π
Bound to be plenty. π that's literally the whole section, bestie.
π 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:
- 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.
and that's the whole page, bestie π«Ά this was Regexp:...RI::http(3), source/version perl v5.42.0, dated 2024-08-09. periodt. π
β¨
π¦ 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