1Regexp::Common::URI::htUtspe(r3)Contributed Perl DocumenRteagteixopn::Common::URI::http(3)
2
3
4

NAME

6       Regexp::Common::URI::http -- Returns a pattern for HTTP URIs.
7

SYNOPSIS

9           use Regexp::Common qw /URI/;
10
11           while (<>) {
12               /$RE{URI}{HTTP}/       and  print "Contains an HTTP URI.\n";
13           }
14

DESCRIPTION

16   $RE{URI}{HTTP}{-scheme}
17       Provides a regex for an HTTP URI as defined by RFC 2396 (generic
18       syntax) and RFC 2616 (HTTP).
19
20       If "-scheme => P" is specified the pattern P is used as the scheme.  By
21       default P is "qr/http/". "https" and "https?" are reasonable
22       alternatives.
23
24       The syntax for an HTTP URI is:
25
26           "http:" "//" host [ ":" port ] [ "/" path [ "?" query ]]
27
28       Under "{-keep}", the following are returned:
29
30       $1  The entire URI.
31
32       $2  The scheme.
33
34       $3  The host (name or address).
35
36       $4  The port (if any).
37
38       $5  The absolute path, including the query and leading slash.
39
40       $6  The absolute path, including the query, without the leading slash.
41
42       $7  The absolute path, without the query or leading slash.
43
44       $8  The query, without the question mark.
45

REFERENCES

47       [RFC 2396]
48           Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource
49           Identifiers (URI): Generic Syntax. August 1998.
50
51       [RFC 2616]
52           Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L.,
53           Leach, P. and Berners-Lee, Tim: Hypertext Transfer Protocol --
54           HTTP/1.1.  June 1999.
55

SEE ALSO

57       Regexp::Common::URI for other supported URIs.
58

AUTHOR

60       Damian Conway (damian@conway.org)
61

MAINTENANCE

63       This package is maintained by Abigail (regexp-common@abigail.be).
64

BUGS AND IRRITATIONS

66       Bound to be plenty.
67
69       This software is Copyright (c) 2001 - 2017, Damian Conway and Abigail.
70
71       This module is free software, and maybe used under any of the following
72       licenses:
73
74        1) The Perl Artistic License.     See the file COPYRIGHT.AL.
75        2) The Perl Artistic License 2.0. See the file COPYRIGHT.AL2.
76        3) The BSD License.               See the file COPYRIGHT.BSD.
77        4) The MIT License.               See the file COPYRIGHT.MIT.
78
79
80
81perl v5.36.0                      2022-07-22      Regexp::Common::URI::http(3)
Impressum