CIS 2250 Lecture Notes - Lecture 17: Grep, Regular Expression, Qantas

43 views6 pages

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents