NAME

Puma::RegEx - regular expression repository for Puma


SYNOPSIS

 use Puma::RegEx qw( getRegEx );
 my $regex = getRegEx('regexname', options ... );


DESCRIPTION

The Puma::RegEx package returns pre-defined regular expressions for Puma's core functions.

By placing many of the more complex regular expressions in this package we have managed to make the original code more readable through the elimination of heredocs and allowing room for more extensive documentation of the regular expressions.


FUNCTIONS

getRegEx(NAME, [OPTIONS], ...]])

This method returns a compiled regular expression based on the parameters passed to it. The OPTIONS passed to the function vary based on the NAME of the regular expression requested:

'tagparser'

The 'tagparser' regex is the main regex for separating markup out of the data stream. It takes an aditional parameter 'LABELRULES' that defines additional rules so that the regex can identify non-standard or proprietary tags.

The regex returns two values ($1 and $2) when run: the text before the tag and the content of the tag itself.

'tagpair' and 'tagstandalone'

These regular expressions extract values from within a tag.

'tagpair' breaks out a name=``value'' pair into $1 and $2. 'tagstandalone' returns the content of a standalone tag as $1.


COPYRIGHT

Copyright (c) 2001, 2002 by Ingmar Ellenberger.

Distributed under The Artistic License. For the text of this license, see http://puma.site42.com/license.psp or read the file LICENSE in the root of the distribution.