CIS 2250 Lecture Notes - Lecture 17: Grep, Regular Expression, Qantas
Document Summary
Regular expressions are a powerful tool for text processing. They allow for the description and parsing of text. With additional support, tools employing regular expressions can modify text and data. Check many files to confirm that in each file the word setsize appears exactly as often as. Resetsize: also, disregard lower and upper case, similar to the problem of checking that your code has as many closing braces } as it has opening braces { Check any number of files and report any occurrence of double words, e. g. the the: should be case insensitive, i. e. the the, if you were checking html code then you would have to disregard html tags, e. g. the. Given a regular expression and files to search, egrep attempts to match the regex (regular expression) to each line of each file egrep ^(from|search):" email-file. Egrep breaks the input file into separate text lines. There is no understanding of high-level concepts, such as words.