Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content Skip to complementary content

wildmatch - script and chart function

The wildmatch function compares the first parameter with all the following ones and returns the number of the expression that matches. It permits the use of wildcard characters ( * and ?) in the comparison strings. * matches any sequence of characters. ? matches any single character. The comparison is case insensitive and insensitive to the Japanese Hiragana and Katakana character systems.

Syntax:  

wildmatch( str, expr1 [ , expr2,...exprN ])

Return data type: integer

If you want to use comparison without wildcards, use the match or mixmatch functions.

Arguments
Argument Description
str The string to be evaluated.
expr1 The first expression to check for a valid number representation.
expr2

The second expression to check for a valid number representation.

expr3

The third expression to check for a valid number representation.

Example: Chart expressions
Example Result

wildmatch( ColorCode,'black','*Blue*' )

This expression returns 1 if the value of ColorCode is Black or 2 if the value of ColorCode is Blue or Light Blue or blue.
wildmatch( Cities,'toronto','Boston','Beijing','Zurich') This expression returns the index of the item that matches the value in the Cities field.

Some of the examples in this topic use inline loads. For more information, see Using inline loads to load data.

Example - Categorize products using wildmatch

Example - Evaluate and classify client data using wildmatch

Example: Load script using wildmatch

Example - Chart expression using wildmatch

Example - Custom sort expression using wildmatch

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!