Use Case Accelerators > How to Achieve INSTR Functionality

How to Achieve INSTR Functionality

Article #: Product: Version:


INSTR, or Instring, is a function in VB, PL/SQL, and Informatica that searches an input string for a specific occurrence of a substring, and returns the location of the first character of that instance of the substring in the input string.

As of release 7.14, DMExpress offers a native InString function. We recommend upgrading to a release that supports the native function for improved performance/efficiency, but if you are on a prior release, you can implement INSTR functionality by using a combination of the DMExpress functions Extract and LengthOf.


The INSTR function takes the following parameters as input:

It returns the position of the specified occurrence of the search string in the input string.

For example, the following call to INSTR would return 15:

INSTR("The rain in Spain stays mainly in the plain.", "ain", 2)

Attachments, compatible with DMExpress version 7.9 or higher

Additional Information

For See
additional information on regular expressions in DMExpress Syntax of Regular Expression and Regular expression special characters in the DMExpress Help
details on the native InString function in DMExpress InString function in the DMExpress Help
Last updated: