============================================================================== Release of version 2.122 of Regexp::Common ============================================================================== The main reason for version 2.122 is a change in the license. You now have the option to use this software under either the original Artistic License, the Artistic License 2.0, the MIT license, or the BSD license. WARNINGS: INCOMPATIBLE CHANGE in version 2.119: The $N settings for the -keep option of US postal codes ($RE {zip} {US} {-keep}) have been changed. See the Regexp::Common::zip for details. INCOMPATIBLE CHANGE in version 2.113: Regexp::Common used to set $; to '='. This no longer happens, because setting $; breaks Filter::Simple. This means that regexps of the form $RE{foo}{"-flag=value"} no longer work! They need to be written as $RE{foo}{"-flag$;value"} or as $RE{foo}{-flag => "value"}. When defining patterns using the pattern function, a = still needs to be used to separate the flag from its default value. This has not been changed. We are very sorry for the inconvenience. NAME Regexp::Common - Provide commonly requested regular expressions SYNOPSIS use Regexp::Common; while (<>) { /$RE{num}{real}/ and print q{a number\n}; /$RE{quoted}/ and print q{a ['"`] quoted string\n}; /$RE{delimited}{-delim=>'/'}/ and print q{a /.../ sequence\n}; /$RE{balanced}{-parens=>'()'}/ and print q{balanced parentheses\n}; /$RE{profanity}/ and print q{a #*@%-ing word\n}; } DESCRIPTION By default, this module exports a single hash (`%RE') that stores or generates commonly needed regular expressions. Patterns currently provided include: * balanced parentheses and brackets * delimited text (with escapes) * integers and floating-point numbers in any base (up to 36) * comments in 44 languages * offensive language * lists of any pattern * IPv4 addresses * URIs. * Zip codes. Future releases of the module will also provide patterns for the following: * email addresses * HTML/XML tags * mail headers (including multiline ones), * more URIs * telephone numbers of various countries * currency (universal 3 letter format, Latin-1, currency names) * dates * binary formats (e.g. UUencoded, MIMEd) * Credit card numbers. INSTALLATION It's all pure Perl, so just put the .pm files in their appropriate local Perl subdirectory. Alternatively, use the common approach: - untar the archive - run: perl Makefile.PL - run: make - run: make test - run: make install AUTHORS Damian Conway (damian@cs.monash.edu.au) and Abigail (regexp-common@abigail.be) MAINTAINER Abigail (regexp-common@abigail.be) COPYRIGHT and LICENSE This software is Copyright (c) 2001 - 2008, Damian Conway and Abigail. This module is free software, and maybe used under any of the following licences: 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 Licence. See the file COPYRIGHT.BSD. 4) The MIT Licence. See the file COPYRIGHT.MIT. ============================================================================== CHANGES IN VERSION 2.122 Revision history for Perl extension Regexp::Common. 2.122 Mon May 26 18:59:20 CEST 2008 2.121 - Removed spurious '=head1' from README. (Smylers) - Comments for 'm4', 'Modula-2', 'Modula-3', 'Ubercode', and 'ZZT-OOP'. - Fix for French zip codes; addes Swiss zip codes (Rafael) 2.120 Wed Mar 16 01:39:57 CET 2005 - '-base', and '-places' options for $RE {num} {int}. '-group' can now take arguments for the form 'N,M'. - New file: t/number/integer.t - Comments for BML, INTERCAL (JP), and CQL. - Regexp::Common::SEN nits. - Many more tests. - ca. 223k tests in 56 files. 2.119 Sat Jan 1 17:57:01 CET 2005 - Changed -keep settings of $RE {zip} {US}. - Replaced occurrences of '\d' with '[0-9]' in number.pm and net.pm, because with Unicode more characters than just 0 - 9 will match '\d'. - Moved part of the tests of t/test_comment.t into different files in t/comment. - t/Common.pm now also tests OO and sub versions. - Fixed regex for J comments. - $VERSION nit in Regexp::Common::URI::RFC2384 - POD nit in Regexp::Common::_support (Mike Castle) - POD nit in Regexp::Common::comment. - 176048 tests in 53 files. 2.118 Wed Dec 15 00:16:09 CET 2004 - Introduced Regexp::Common::_support. - Disabled the '-prefix' option for Danish zip codes if the Perl version is older than 5.005_03, as they triggered bugs. 5.005_03 and more recent versions of Perl don't have this problem. - Fixed the generic OO routines. (They never worked correctly). - 134191 tests in 49 files. 2.117 Thu Jul 1 12:11:47 CEST 2004 - Fixed problems with squares and 32bit integer Perls. - Pod nits in Regexp::Common (Jim Cromie) - $VERSION fix in Regexp::Common::URI::RFCC2384 (Mike Arms) - Discuss unwanted matching in Regexp::Common::net (Charles Thomas) - 132238 tests in 48 files. 2.116 Wed Jun 30 11:37:45 CEST 2004 - Restricted recognition of squares to numbers less than 9000000000000000, to avoid problems with round-off errors. - Fixed an off-by-one error in t/zip/spain.t which caused some test to fail when they shouldn't. - 132235 tests in 48 files. 2.115 Wed Jun 9 23:59:13 2004 - Patterns for comments of ABC, Caml, CLU, COBOL, ECMAScript, Icon, J, JavaScript, Lisp, M, MUMPS. - Patterns for postal codes of Norway, Italy and Spain. - Patterns for US SSN. - New way of doing tests using t::Common, giving more control to test program. - Random generators in t::Common. - Cut down on tests in test_lingua_palindrome.t. - Fixed bug in t/zip/australia.t could cause an infinite loop. - 132225 tests in 48 files. 2.114 Sun May 25 21:34:56 2003 - Fix to t/zip/greenland.t to avoid generating valid zipcodes when testing for failures. - Fixes to t/URI/gopher.t and t/URI/wais.t to avoid warnings. - Australian postal codes now accept '0909'. (Ron Savage) - Added comments for 'C--', 'C#', 'Cg', 'Nickle', 'PL/SQL', 'QML' and SLIDE. - Fixed the assignment of the version number to $VERSION in 6 classes. - 158287 tests in 44 files. - 134 patterns in 11 classes and 12 subclasses. 2.113 Wed Apr 2 22:58:46 2003 - INCOMPATIBLE CHANGE! Regexp::Common used to set $; to '='. This no longer happens, because setting $; breaks Filter::Simple. (Report by Tim Maher). This means that regexps of the form $RE{foo}{"-flag=value"} no longer work! They need to be written as $RE{foo}{"-flag$;value"} or as $RE{foo}{-flag => "value"}. When defining patterns using the pattern function, a = still needs to be used to separate the flag from its default value. This has not been changed. We are very sorry for the inconvenience. - 157762 tests in 44 files. - 127 patterns in 11 classes and 12 subclasses. 2.112 Wed Mar 26 00:25:04 2003 - prospero and pop URIs - Fixed documentation of Regexp::Common::lingua to document the lingua stuff instead of Regexp::Common::zip (Murat). - 157761 tests in 44 files. - 127 patterns in 11 classes and 12 subclasses. 2.111 Wed Mar 12 23:30:03 2003 - Introduced the -i switch. Important if you are using the functional interface and want to be able to match case insensitive. (Request from Tim Maher). - Introduced the -nospace switch for $RE{net}{domain} (Request from Juerd). - Decimal numbers. - WAIS URIs. - More generic setup to define comments for various languages. - Expanded and redid the documentation for comment.pm. - Comments for Advisor, Advsys, Alan, Algol 60, Algol 68, B, BASIC (mvEnterprise), Forth, Fortran (both fixed and free form), fvwm2, mutt, Oberon, 6 versions of Pascal, PEARL (one of the at least four...), PL/B, PL/I, slrn, Squeak. - 151114 tests in 42 files. - 125 patterns in 11 classes and 10 subclasses. 2.110 Fri Feb 21 15:58:14 2003 - Fixed t/test_squares.t. '0x7FFFFFFFFFFFFFFF' cannot be used on non-64bit platforms - eval to the rescue. - Added $VERSION to the .pm files who were missing them. - gopher, news, nntp URIs. - 145013 tests in 39 files. - 100 patterns in 11 classes and 9 subclasses. 2.109 Mon Feb 10 22:41:45 2003 - Split out URI.pm into a myriad of files. There is a separate file for each URI scheme, and a separate file for each RFC that's used. URI.pm requires all the URI scheme files, and constructs the combining URI regexp. - file URIs. - Cut down on the number of tests run for certain classes. - 123810 tests in 36 files. - 95 patterns in 11 classes and 7 subclasses. 2.108 Sun Feb 9 22:58:56 2003 - Postal codes for Belgium, Denmark and Greenland. - Renamed the postal code patterns. - 194125 tests in 35 files. - 94 patterns in 11 classes. 2.107 Fri Feb 7 23:20:35 2003 - telnet URIs; Lua and FPL comments. - common code factored out - created t/Common.pm - 175984 tests in 32 files. - 91 patterns in 11 classes. 2.106 Sun Feb 2 18:42:08 2003 - Makefile.PL fixes for Windows. 2.105 Sun Feb 2 04:15:54 2003 (In remembrance of the Columbia crew) - Australian postal codes. - Reorganized t/ directory by adding subdirectories. - 88 patterns in 11 classes. - 163355 tests in 31 files. 2.104 Fri Jan 24 16:44:19 2003 - Forgot to add t/test_zip_german.t and t/test_zip_french.t to the MANIFEST file. 2.103 Thu Jan 23 03:21:17 2003 - Added German and French postal codes. - Fixed some bugs concerning HTTP URIs. - Complete remake of t/test_uri_http, with 15k+ tests. Extended testing exposed the now fixed bugs. - 87 patterns in 11 classes. - 156778 tests in 30 files. 1.30 Fri Jan 17 14:20:02 2003 - Fixed a bug concerning HTTP and FTP URIs. (reported by Hermann-Marcus Behrens) 1.29 Thu Jan 16 12:07:02 2003 - New since last release: Squares, Roman numbers, TV URIs, Palindromes, Dutch and US postal codes. - 131710 tests in 28 files. 11 pattern classes. 1.20 Tue Aug 27 19:06:13 CEST 2002 - Balanced patterns can now take multiple sets of arbitrary strings as delimiters. - Fax URIs. - More comment patterns. 0.09 Tue Aug 6 16:44:57 CEST 2002 - Fixed $RE{URI}{tel}, local phone numbers can have future extensions as well. 0.08 Tue Aug 6 15:50:31 CEST 2002 - Added tel URI regexes. 0.07 Mon Aug 5 14:31:17 CEST 2002 - Fixed 'Regex::' and 'Rexexp::' typos. - Split t/test_uris.t into t/test_ftp_uri.t, t/test_http_uri.t and t/test_uris.t. 0.06 Mon Aug 5 00:56:19 CEST 2002 - URI regexes. Currently only HTTP and FTP. More to come. 0.05 Thu Aug 1 12:01:04 CEST 2002 - Improved the 'subs' method of MAC addresses. 0.04 Thu Aug 1 01:18:37 CEST 2002 - Added the set of $RE{net}{MAC} regexes, by request of Iain Truskett . - Required minimum Perl version for regexes for Haskell and Dylan comment, as they can be recursive. - Petdance suggested regexes for LOGO comments. 0.03 Wed Jul 31 15:21:11 CEST 2002 - Made the entire setup more modular, giving each set of patterns its own .pm file. Loading all goes via Regexp::Common though. - use strict; everywhere - it also runs under -W (localized). - Added comment regexes for many more languages (26 currently). - Fixed some small bugs. 0.02 Tue Jul 23 23:18:15 2002 - Added $RE{comment}{HTML} 0.01 Thu May 18 14:45:14 2000 - original version; created by h2xs 1.18 ============================================================================== AVAILABILITY Regexp::Common has been uploaded to the CPAN and is also available from: http://perl.abigail.nl/Modules/Regexp-Common/latest.tar.gz ==============================================================================