Regexp::DefaultFlags - Set default flags on regular expressions


Regexp-DefaultFlags documentation  | view source Contained in the Regexp-DefaultFlags distribution.

Index


NAME

Top

Regexp::DefaultFlags - Set default flags on regular expressions

VERSION

Top

This document describes version 0.01 of Regexp::DefaultFlags released September 28, 2004.

SYNOPSIS

Top

    use Regexp::DefaultFlags;

    # Match /ab[c-z]d/, but lay the pattern out more readably...
    $str =~ / a b [c-z]   # Not fussy on the third letter
                d         # But fussy again on the fourth
            /;

DESCRIPTION

Top

When this module is use'd, it causes regexes in the current namespace to act as if the /xms flags had been applied to them.

See perlre for more details and caveats on these flags.

If an argument is passed to the use statement, the module uses the flags specified in that argument instead of /xms. The replacement flags can be specified in any of the following ways:

    use Regexp::DefaultFlags qw( /x /i /m );
    use Regexp::DefaultFlags qw( /xim );
    use Regexp::DefaultFlags qw( xim );

TEST COVERAGE

Top

 ------------------------------------------------------------------
 File                        stmt branch cond   sub pod  time total
 ------------------------------------------------------------------
 lib/Regexp/DefaultFlags.pm 100.0  100.0  n/a 100.0 n/a 100.0 100.0
 Total                      100.0  100.0  n/a 100.0 n/a 100.0 100.0
 ------------------------------------------------------------------

AUTHOR

Top

Damian Conway (damian@conway.org)

MAINTAINERS

Top

Autrijus Tang <autrijus@autrijus.org>, Brian Ingerson <INGY@cpan.org>.

COPYRIGHT

Top


Regexp-DefaultFlags documentation  | view source Contained in the Regexp-DefaultFlags distribution.