You are viewing the documentation for Blueriq 14. 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 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.attributeValueType
File.name"Thisfile_1.doc"String
ExpressionResultType
MATCH ( "Thisfile_1.doc" , File.name )TRUEboolean
MATCH ( File.name , "Thisfile_1.doc" )TRUEboolean
MATCH ( " Thisfile_1.doc" , File.name )FALSEboolean
MATCH ( "thisfile_1.doc" , File.name )FALSEboolean
MATCH ( "[A-Z]hisfile_1.doc" , File.name )TRUEboolean
MATCH ( "[a-z]hisfile_1.doc" , File.name )FALSEboolean
MATCH ( "Thisfile_[0-9].doc" , File.name )TRUEboolean
MATCH ( ".............." , File.name )TRUEboolean
MATCH ( ".*" , File.name )TRUEboolean
MATCH ( "**" , "**" )Error"**" is not a valid regular expression


Back to Top