implemented regexp search for String#rindex