Return to String Function Index
String Function Syntax and Examples
INSTRREV( )The INSTRREV() function returns an integer indicating the position of the last character of the last occurrence of a given string within another string.
Syntax:
INSTRREV(string1,string2[,[CASEINSENS | 0] | [CASESENS | 1] ])
where:
- string1 is the string to be searched
- string2 is the string whose position you are trying to find
- the optional CASEINSENS | CASESENS argument determines whether the comparison is to be case-sensitive (cases must match) or case-insensitive. The CASEINSENS and CASESENS arguments can be replaced by 0 and 1, respectively. By default, NDL++ searches are case-sensitive.
Example:
input: thisISasamplestring
IMPORT @sample.dat
{RECORD
{
field1 *\r\n
}
schema1.table1
{
col1 INSTRREV(field1,'is')
col2 INSTRREV(field1,'is�,0)
}}
Results:
schema1.table1.col1 4 schema1.table1.col2 6
Return to String Function Index