You are viewing the documentation for Blueriq 13. Documentation for other versions is available in our documentation directory.
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.attribute | Value | Type |
---|---|---|
File.name | "Thisfile_1.doc" | String |
Expression | Result | Type |
---|---|---|
FIND ( "_[1-5]" , File.name ) | "_1" | String |
FIND ( "File" , File.name ) | UNKNOWN | String |
FIND ( "el" , "Hello" ) | "el" | String |
FIND ( "el" , "Hello" , 2 ) | UNKNOWN | String |
FIND ( "eo" , "Hello" ) | UNKNOWN | String |
FIND ( "\s[a-zA-Z]+" , "Hello world example" ) | "world" | String |
FIND ( "\s[a-zA-Z]+" , "Hello world example" , 6 ) | "example" | String |
Overview
Content Tools