Codex

Regexp::Common::list

Section: User Contributed Perl Documentation (3pm)

Updated: 2013-03-08

Index?action=index Return to Main Contents


NAME

Regexp::Common::list -- provide regexes for lists

SYNOPSIS

DESCRIPTION

Please consult the manual of Regexp::Common for a general description of the works of this interface.

Do not use this module directly, but load it via Regexp::Common.

$RE{list}{-pat}{-sep}{-lastsep}

Returns a pattern matching a list of (at least two) substrings.

If P is specified, it defines the pattern for each substring in the list. By default, P is . In Regexp::Common 0.02 or earlier, the default pattern was . But that will match a single space, causing unintended parsing of as a list of four elements instead of 3 (with being ). One consequence is that a list of the form ``a,,b'' will no longer be parsed. Use the pattern to be able to parse this, but see the previous remark.
If P is specified, it defines the pattern P to be used as a separator between each pair of substrings in the list, except the final two. By default P is .
If P is specified, it defines the pattern P to be used as a separator between the final two substrings in the list. By default P is the same as the pattern specified by the flag.

For example:

Under :
$1
captures the entire list:
$2
captures the last separator:

$RE{list}{conj}{-word=PATTERN}

An alias for PATTERN
If is not specified, the default pattern is .

For example:

$RE{list}{and}

An alias for

$RE{list}{or}

An alias for

SEE ALSO

Regexp::Common for a general description of how to use this interface.

AUTHOR

Damian Conway ([email protected])

MAINTAINANCE

This package is maintained by Abigail ([email protected]).

BUGS AND IRRITATIONS

Bound to be plenty.

For a start, there are many common regexes missing. Send them in to [email protected].

LICENSE and COPYRIGHT

This software is Copyright (c) 2001 - 2009, Damian Conway and Abigail.

This module is free software, and maybe used under any of the following licenses:


Index

NAME

SYNOPSIS

DESCRIPTION

$RE{list}{-pat}{-sep}{-lastsep}

$RE{list}{conj}{-word=PATTERN}

$RE{list}{and}

$RE{list}{or}

SEE ALSO

AUTHOR

MAINTAINANCE

BUGS AND IRRITATIONS

LICENSE and COPYRIGHT