SYNOPSIS string extract(string str, int from, int to) string extract(string str, int from) string str[from .. to] DESCRIPTION Extract a substring from a string. Character 0 is first character. extract(str, n) will return a substring from characer number n to the end of str. extract(str, i, j) will return a string from character i to character j. The expression str[from .. to] is equivalent to extract(str, from, to). If you use extract(), then from and to may be given as negative integers to indicate positions from the end of the string. If you use the str[] form, you have to prepend the number with a < sign (see examples). Warning: the extract() is supported only for hysterical raisins. Use the [..] notation instead. EXAMPLES str="this is a test"; extract(str,4,4) <=> str[4..4] : " " NOTE: str[4] == 32 extract(str,4,7) <=> str[4..7] : " is " extract(str,-5) <=> str[<5..<1] : " test" extract(str,-5,-2) <=> str[<5..<2] : " tes" extract(str,2,-3) <=> str[2..<3] : "is is a te" extract(str,500),extract(str,-500),str[8..<8] : "" SEE ALSO sscanf(E), explode(E)