Tests a string or list of strings against a query expression similar to an AltaVista "simple query". Elements of the query expression may be regular expressions or literal text, and may be assigned weights. Example: +sky blue -clouds Query expressions consist of words (sequences of non-whitespace), regexps or phrases (quoted strings) separated by whitespace. Words or phrases prefixed with a + must be present for the expression to match; words or phrases prefixed with a - must be absent for the expression to match. Words or phrases may optionally be followed by a number in parentheses (no whitespace is allowed between the word or phrase and the parenthesized number). This number specifies the weight given to the word or phrase; it will be added to the count each time the word or phrase appears in the text. Example: +sky blue(2) -clouds If a weight is not given, a weight of 1 is assumed. From Text-Query-Simple 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. Example: sky and blue and not (clouds or rain) Query expressions consist of literal strings (or regexps) joined by the following operators, in order of precedence from lowest to highest: OR, | 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. From Text-Query-Advanced |