Compare with the text at shift from the right, and let be the position of the first difference, with the bad character. Let be the last position of in , or if does not occur in . The bad-character rule moves to the shift .
River is compared from its right end; the text’s - differs from r and occurs nowhere in the pattern, so no shift that puts a letter of the pattern under it can match, and the pattern jumps past it.