getRange function

Syntax

  • string getRange(string inputstring, string lmatchString, string rmatchString)

Returns

Extract inputString between end of lmatchString and rmatchString.

Description

The getRange function extracts the inputString from the end of the lmatchString up to the beginning of the rmatchString.

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

In this topic