You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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.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

  • No labels