Keyword Pattern Matching

Syntax

The syntax for a pattern patch is:

[[QUALIFIER][FIELD]MATCH_STRING[["][ ][\]]*

Qualifier

QUALIFIER is 1 or 2 characters and may be:

  • "+" MATCH_EXACT

  • "-" MATCH_NEGATIVE

  • "+-" or "-+" MATCH_NEGATIVE_EXACT

If no qualifier is specified then this is the MATCH_ALL case and MATCH_STRING may appear anywhere in the searched text. This search is case insensitive.

For example:
"title:Star" will match shows with the titles "Stardust" and "My Little Star"

If MATCH_EXACT is specified then the MATCH_STRING must be bounded by word boundaries to be considered a match. This match is case sensitive.
For example:
"+title:Star" will match "My Little Star" but will not match "Stardust"

If MATCH_NEGATIVE is specified then it works as MATCH_ALL, but will be true if the MATCH_STRING is not found. This match is case insensitive.

If MATCH_NEGATIVE_EXACT is specified then it works as with MATCH_NEGATIVE, but will be true the MATCH_STRING is not found. This match is case sensitive.

Field

FIELD may be one of:
"title:"
"series:"
"episode:"
"desc:"
"genre:" If genre is not found in the database this entire string is skipped
"actor:"
"director:"
"repeat:" Value can either be "yes" or "1"
"year:"
"after:"
"before:"
"lang:"
"country:"

Pattern to Match

MATCH_STRING may be any string. If no qualifier fields are set then the MATCH_STRING will match to any of the following fields:
title
series
episode
desc
genre
director
actor
country
lang

If multiple matches are defined they must all match successfully for the entire pattern to match any show.

Examples

  1. "-genre:comedy title:doctor": Match all shows that have the string or sub string "doctor" in the title but where the genre is not comedy.

  2. "-+:desc:Milhouse +title:Simpsons": Match all shows that have the string "Simpsons" in the title where "Simpsons" is bounded by word boundaries but do not contain the string "Milhouse" in the description where "Milhouse" is bounded by word boundaries.

Word Boundaries

A word boundary is a position between at the beginning or end of a string if it begins or ends (respectively) with a word character ([0-9A-Za-z_]).

For example in the string "-12", it would match before the 1 or after the 2. The dash is not a word character.