getRange

Syntax

string getRange(inputString, leftMatchString, rightMatchString)

Parameters

Returns

Extract inputString between end of leftMatchString and begin of rightMatchString.

Description

This 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 = ""

Copyright ©2008-2023 Esri R&D Center Zurich. All rights reserved.