You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
MATCH
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 Encore 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
1 Comment
Michel van der Bent
For example: MATCH ( ".*"+ Proces.ZoekTerm + ".*" , Werknemer.Kenmerk )
This makes it possible to match on parts of the string.