Regexp:...RI::fax(3)

โœจ NAME โœจ

okay bestie, meet Regexp::Common::URI::fax โ€” a User Contributed Perl Documentation page (section 3) that literally returns a pattern for fax URIs. That's the name, that's the mission, slay. ๐Ÿ’…

๐ŸŒธ SYNOPSIS ๐ŸŒธ

Here's the exact group-chat demo, bestie โ€” read it, run it, it prints when your line contains a fax URI. ๐Ÿฆ‹

use Regexp::Common qw /URI/;

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

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

๐ŸŽ€ $RE{URI}{fax} ๐ŸŽ€

Returns a pattern that matches fax URIs, as defined by RFC 2806. Under "{-keep}", the following are returned:

  • $1 โ€” the complete URI. ๐Ÿ’–
  • $2 โ€” the scheme. โœจ
  • $3 โ€” the phone number, including any possible add-ons like ISDN subaddress, a post dial part, area specifier, service provider, etc. ๐Ÿ“ž

๐Ÿฆ‹ "$RE{URI}{fax}{nofuture}" ๐Ÿฆ‹

As above (including what's returned by "{-keep}"), with the exception that future extensions are not allowed. So nofuture is the no surprise future stuff version. ๐Ÿšซ๐Ÿ”ฎ

Without allowing those future extensions, it becomes much easier to check a URI if the correct syntax for post dial, service provider, phone context, etc has been used - otherwise the regex could always classify them as a future extension. That's the lowkey important part, fr fr. ๐Ÿ’…

๐Ÿ“š REFERENCES ๐Ÿ“š

  • [RFC 1035] โ€” Mockapetris, P.: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. November 1987. ๐Ÿ“œ
  • [RFC 2396] โ€” Berners-Lee, Tim, Fielding, R., and Masinter, L.: Uniform Resource Identifiers (URI): Generic Syntax. August 1998. ๐ŸŒ
  • [RFC 2806] โ€” Vaha-Sipila, A.: URLs for Telephone Calls. April 2000. โ˜Ž๏ธ

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

Regexp::Common::URI for other supported URIs. Go check the rest of the URI squad, bestie. ๐Ÿซถ

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Damian Conway (damian@conway.org) โ€” iconic. ๐Ÿ’–

๐Ÿ› ๏ธ MAINTENANCE ๐Ÿ› ๏ธ

This package is maintained by Abigail (regexp-common@abigail.freedom.nl). She's got it. ๐ŸŽ€

๐Ÿ’€ BUGS AND IRRITATIONS ๐Ÿ’€

Bound to be plenty. That's it. That's the whole section. No cap. ๐Ÿ˜ญ

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.

Sign-off time, bestie: this page is from perl v5.42.0, dated 2024-08-09, and the footer title vibe is Regexp:...RI::fax(3). ๐Ÿ’–๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from