getRange function

string getRange(inputString, leftMatchString, rightMatchString)

inputString string

leftMatchString string

rightMatchString string

Returns inputString between the end of leftMatchString and the beginning of rightMatchString.

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