position of string in defined range