Fixed regex to find the first character that is closest to the remainder of the string.