This function extracts the phrase between two phrases in a block of text. One use of this is to extract information from free text fields in the current or in a previous episode. For example, suppose that we defined a Calculated Value Attribute to have name BandNumber and formula:
PQR text between “band” and “was”
then BandNumber would be evaluated as follows in the case fragment below:
01 Jun 03 20 Jun 03 02 Nov 03 PQR Band 657 was previously identified as Kappa1. BandNumber 657
Text between can also be used directly in a condition, for example, the following condition is true for the case above:
PQR text between “identified as” and “.” is “Kappa1”
This function works as follows. The block of text is searched for the first delimiting phrase. A marker is set where this delimiting phrase ends in the text. The text is then searched for the second delimiter, starting the search from the marker. A second marker is set at the start of the second phrase. The text between the two markers is returned. If this search fails because either of the delimiting phrases was not found (or for any other reason), a blank (empty) string is returned.
The search for the text between the marker phrases is not case sensitive, for example, the marker phrase “band” will match “Band” as shown above.
See also: