getRange function

Syntax

  • string getRange(inputString, leftMatchString, rightMatchString)

Parameters

  1. inputStringstring
  2. leftMatchStringstring
  3. rightMatchStringstring

Returns

Extract inputString between end of leftMatchString and rightMatchString.

Description

The getRange function extracts the inputString from the end of the leftMatchString up to the beginning of the rightMatchString.

Note:

Overlapping left/rightMatchStrings return an empty string (see Examples).

Related

Examples

getRange("rule your city with cityengine","y","city")
# result = "our city with "
getRange("myTexture.hasName.001.jpg","hasName.",".jpg")
# result = "001"
getRange("myTexture.hasName.001.jpg",".",".")
# result = "hasName.001"
getRange("CityEngine","CityEn","tyEngine")
# result = ""

In this topic