NAME Text::Query::Advanced - Match text against Boolean expression SYNOPSIS use Text::Query::Advanced; # Constructor $query = Text::Query::Advanced->new([QSTRING] [OPTIONS]); # Methods $query->prepare(QSTRING [OPTIONS]); $query->match([TARGET] [OPTIONS]); DESCRIPTION This module provides an object that matches a string or list of strings against a Boolean query expression similar to an AltaVista "advanced query". Elements of the query expression may be regular expressions or literal text. Query expressions are compiled into an internal form (currently, a regular expression making use of most of the tricks listed in Recipe 6.17 of _The Perl Cookbook_) when a new object is created or the `prepare' method is called; they are not recompiled on each match. Query expressions consist of literal strings (or regexps) joined by the following operators, in order of precedence from lowest to highest: OR, | AND, & NEAR NOT, ! Operator names are not case-sensitive. Note that if you want to use a `|' in a regexp, you need to backwhack it to keep it from being seen as a query operator. Sub-expressions may be quoted in single or double quotes to match "and," "or," or "not" literally and may be grouped in parentheses (`(, )') to alter the precedence of evaluation. A parenthesized sub-expression may also be concatenated with other sub- expressions to match sequences: `(Perl or Python) interpreter' would match either "Perl interpreter" or "Python interpreter". Concatenation has a precedence higher than NOT but lower than AND. Juxtaposition of simple words has the highest precedence of all. INSTALLATION This module is pure Perl, so it can be simply copied into the appropriate directory. RESTRICTIONS This module requires Perl 5.005 or higher AUTHOR Eric Bohlman (ebohlman@netcom.com) CREDITS The parse_tokens routine was adapted from the parse_line routine in Text::Parsewords. COPYRIGHT Copyright (c) 1998 Eric Bohlman. All rights reserved. This program is free software; you can redistribute and/or modify it under the same terms as Perl itself.