Chapter 15 Pattern Matching and Tries | 15.3
For example, to search for the pattern ‘a word followed with a space and followed with a number’, then the
regular expression becomes “\w+\s\d+”.
Here, the regular expression \w matches a word character, because the regular expression is with + symbol.
So, \w+ matches with one or more number characters. en \s matches with a space character, and the \d+
matches with one or more number of digits.
15.4 FIXED PATTERN MATCHING ALGORITHMS
Various algorithms that are used to match a given pattern with the available patterns are discussed. Here, the
pattern that is to be matched is stable all through the search process.
15.4.1 BRUTE FORCE PATTERN MATCHING ALGORITHM
Brute force pattern matching algo