Syntax
- string getRange(inputString, leftMatchString, rightMatchString)
Parameters
- inputString—string
- leftMatchString—string
- rightMatchString—string
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 l+r MatchStrings return an empty string (see example.4)
Related
Examples
example.1
getRange("rule your city with cityengine","y","city")
# result = "our city with "
example.2
getRange("myTexture.hasName.001.jpg","hasName.",".jpg")
# result = "001"
example.3
getRange("myTexture.hasName.001.jpg",".",".")
# result = "hasName.001"
example.4
getRange("CityEngine","CityEn","tyEngine")
# result = ""