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 4 Current »

FIND


Looks for a string pattern within another string and returns the first matching characters. The function is case-sensitive.


Syntax

FIND ( pattern , string )
FIND ( pattern , string , startIndex )



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 - An attribute of base type string or an expression that results in a string.
  • startIndex - A positive integer value indicating at which character of the string the search should start (inclusive). This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. The first character starts at index 0.


Return type

  • string


Examples

Entity.attributeValueType
File.name"Thisfile_1.doc"String
ExpressionResultType
FIND ( "_[1-5]" , File.name )"_1"String
FIND ( "File" , File.name )UNKNOWNString
FIND ( "el" , "Hello" )"el"String
FIND ( "el" , "Hello" , 2 )UNKNOWNString
FIND ( "eo" , "Hello" )UNKNOWNString
FIND ( "\s[a-zA-Z]+" , "Hello world example" )"world"String
FIND ( "\s[a-zA-Z]+" , "Hello world example" , 6 )"example"String


Back to Top

 

  • No labels