A small question about the pattern matching of data structure and string

A little doubt on the intermediate textbook of programmers in the soft exam:

in the worst case, each unsuccessful match is the last character of the pattern string, which is not equal to the corresponding character in the main string, then the starting position of the new run in the main string is i-m+2.

where did this i-m+2 come from?
according to the simple string matching algorithm, it is not successful. The starting position of the next trip should be the next character of the main string.

assume that the main string is S, the length is n, the pattern string is P, and the length is m.
start with S [0], compare S and P
bit by bit, if the match fails, start with S [1], and then S [2] S [3].

Sep.21,2021

the I here should mean: in the worst case, the location subscript of the main string that fails to match the pattern string.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5b179-455e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5b179-455e1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?