You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
MATCH
The MATCH
function compares a string pattern to another string and returns TRUE if the string exactly matches the pattern, and otherwise FALSE. The MATCH function is case-sensitive.
Syntax
MATCH ( pattern , string )
Inputs
- pattern - An attribute of base type string or a string value. String must be a valid regular expression. The regular expressions used in several Blueriq Studio functions are common Java 1.4 expressions. For a complete documentation we refer to the online java documentation.
- string - String value, attribute of base type string or an expression that results in a string value.
Return type
- Boolean
Examples
Entity.attribute | Value | Type |
---|---|---|
File.name | "Thisfile_1.doc" | String |
Expression | Result | Type |
---|---|---|
MATCH ( "Thisfile_1.doc" , File.name ) | TRUE | Boolean |
MATCH ( File.name , "Thisfile_1.doc" ) | TRUE | Boolean |
MATCH ( " Thisfile_1.doc" , File.name ) | FALSE | Boolean |
MATCH ( "thisfile_1.doc" , File.name ) | FALSE | Boolean |
MATCH ( "[A-Z]hisfile_1.doc" , File.name ) | TRUE | Boolean |
MATCH ( "[a-z]hisfile_1.doc" , File.name ) | FALSE | Boolean |
MATCH ( "Thisfile_[0-9].doc" , File.name ) | TRUE | Boolean |
MATCH ( ".............." , File.name ) | TRUE | Boolean |
MATCH ( ".*" , File.name ) | TRUE | Boolean |
MATCH ( "**" , "**" ) | Error | "**" is not a valid regular expression |
Overview
Content Tools