The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Search::Tools::RegExp::Keywords - access regular expressions for keywords

SYNOPSIS

 my $regexp = Search::Tools::RegExp->new();
 
 my $kw = $regexp->build('the quick brown fox');
 
 for my $w ($kw->keywords)
 {
    my $r = $kw->re( $w );
 }

 
 

DESCRIPTION

Search::Tools::RegExp::Keywords provides access to the regular expressions for a query keyword.

A Search::Tools::RegExp::Keywords object is returned by the Search::Tools::RegExp build() method. This class is typically not used in isolation.

METHODS

In addition, a Search::Tools::RegExp::Keywords object inherits from its parent Search::Tools::RegExp object the common accessors defined in @Search::Tools::Accessors. Since a S::T::R::Keywords object doesn't modify anything, you should consider those common accessors as accessors only, not mutators.

The following methods are available.

new

Create an object. Used internally.

keywords

Returns array of keywords in same order as they appeared in the original query.

re( keyword )

Returns a Search::Tools::RegExp::Keyword object corresponding to keyword.

kw

Get the original S::T::Keywords object from which the object is derived.

AUTHOR

Peter Karman perl@peknet.com

Based on the HTML::HiLiter regular expression building code, originally by the same author, copyright 2004 by Cray Inc.

Thanks to Atomic Learning www.atomiclearning.com for sponsoring the development of this module.

COPYRIGHT

Copyright 2006 by Peter Karman. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

HTML::HiLiter, Search::Tools::RegExp, Search::Tools::RegExp::Keyword