wildcard

Purpose

Finds text fragments corresponding to a wildcard expression.

Syntax

wildcard(expression)

Arguments

The function takes as argument an expression in quotation marks. The expression must correspond to a special wildcard coding standard. PolyAnalyst’s wildcard syntax is based on Microsoft’s one. For more information please see http://msdn.microsoft.com/en-us/library/ff558819%28v=vs.85%29.aspx.

PolyAnalyst supports the following wildcard syntax operations:

  • * - any number of characters;

  • ? - any single character;

  • # - any number of the preceding characters;

  • + - one or more of the preceding characters;

  • [] - list of characters.

Users can instruct PolyAnalyst to be case-sensitive, using the casesens parameter: if casesens:=yes, the expression is case-sensitive. By default, the parameter is set to "no".

Returned Value

Documents matching the query.

Examples

wildcard("log") matches "log", as no special wildcard syntax is involved.

wildcard("log*") matches "log", "logs", "logging" and so forth, as the "*" symbol means any number of characters.

wildcard("log?") matches "logs", but not "logging" and so forth, as the "?" symbol means any single character.

wildcard("l[aeo]g") matches "lag", "leg" or "log", as the "[aeo]" expression means "a", "e" or "o" characters.

wildcard("lo#g") matches "lg", "log", "loog", "looog" and so forth, as the "o#" expression means zero or more "o" characters.

wildcard("lo+g") matches "log", "loog", "looog" and so forth, as the "o+" expression means one or more "o" characters.

wildcard("LOG?", casesens:="yes") matches "LOGS", but not "logs".