©Brooks/Cole, 2001 Chapter 9 Regular Expressions.
-
Upload
gillian-barker -
Category
Documents
-
view
226 -
download
1
Transcript of ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.
![Page 1: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/1.jpg)
©Brooks/Cole, 2001
Chapter 9
Regular Expressions
![Page 2: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/2.jpg)
©Brooks/Cole, 2001
Figure 9-1
Regular Expression
![Page 3: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/3.jpg)
©Brooks/Cole, 2001
Figure 9-2
Atoms
![Page 4: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/4.jpg)
©Brooks/Cole, 2001
Figure 9-3
Single-Character Pattern Example
![Page 5: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/5.jpg)
©Brooks/Cole, 2001
Figure 9-4
Dot Atom Example
. Matches any character except \n (newline)
![Page 6: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/6.jpg)
©Brooks/Cole, 2001
Figure 9-5
Class Atom Example
A class of letters inside [], [a-z] , [abc], [A-Z0-9]
![Page 7: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/7.jpg)
©Brooks/Cole, 2001
Figure 9-6
Example of Classes
![Page 8: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/8.jpg)
©Brooks/Cole, 2001
Figure 9-7
Anchors
![Page 9: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/9.jpg)
©Brooks/Cole, 2001
Figure 9-8
Operators
![Page 10: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/10.jpg)
©Brooks/Cole, 2001
Figure 9-9
Example of Sequence Operator
![Page 11: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/11.jpg)
©Brooks/Cole, 2001
Figure 9-10 Evaluation of a String Using Sequence Operator
![Page 12: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/12.jpg)
©Brooks/Cole, 2001
Figure 9-11
Alternation Operator
![Page 13: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/13.jpg)
©Brooks/Cole, 2001
Figure 9-12
Matching Alternation Operators
![Page 14: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/14.jpg)
©Brooks/Cole, 2001
Figure 9-13
Repetition Operator
![Page 15: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/15.jpg)
©Brooks/Cole, 2001
Figure 9-14
Basic Repetition Forms
![Page 16: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/16.jpg)
©Brooks/Cole, 2001
Figure 9-15 Example of Short Form Repetition Operators
![Page 17: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/17.jpg)
©Brooks/Cole, 2001
Figure 9-16
Repeating Pattern Matching
![Page 18: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/18.jpg)
©Brooks/Cole, 2001
Figure 9-17
Greedy Matching
![Page 19: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/19.jpg)
©Brooks/Cole, 2001
Figure 9-18
Group Operator
![Page 20: ©Brooks/Cole, 2001 Chapter 9 Regular Expressions.](https://reader035.fdocuments.net/reader035/viewer/2022062321/56649f275503460f94c3f362/html5/thumbnails/20.jpg)
©Brooks/Cole, 2001
Figure 9-19 Saving