$EXTRACT(str, index=1, last_index = index)

Extracts a substring from str, starting at index and continuing until last_index.

If index is out of bounds, return null.

If last_index is less than index, return empty string.

If last_index is out of bounds, just continue to the end of the string.


$EXTRACT("ASDF", 2) -> "S"

$EXTRACT("ASDF", 2, 3) -> "SD"

$EXTRACT("ASDF", 2, 10) -> "SDF"

$EXTRACT("ASDF", 10) -> null