Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColorwhite

FIND


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


Syntax

Code Block
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 The regular expressions used in several Blueriq Studio functions Encore 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

...