of a pattern string within another string or body of text E.g. We have a string “BCATDOG” and the pattern to be searched is “CAT”. Now finding “CAT” in the string “BCATDOG” is string matching
Match the first character of the pattern with the first character of the string If succeed, try to match the second character, and then third and so on
the pattern over one character and try again When a match is found, return its starting location Example: Given string “BCCATDOG” Pattern to match is “CAT”
pattern with the first character of the string Step3: If hit a failure point, slide the pattern over one character and try again Step2: If succeed, try to match the next character, and so on Step4: When a match is found, return its starting location Starting location for the pattern in the string is “3”
have some other applications: Detecting Plagiarism: it is the process of locating instances of plagiarism within a work or document Bioinformatics String algorithms are centrally important in bioinformatics for dealing with sequence information