Skip to content

Commit

Permalink
finished first 3 regex exercises. added shells for other files.
Browse files Browse the repository at this point in the history
  • Loading branch information
crlane committed Feb 26, 2012
1 parent e431e42 commit a01108f
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 0 deletions.
Empty file.
7 changes: 7 additions & 0 deletions chapter7/containsAPeriod
@@ -0,0 +1,7 @@
#!/usr/bin/perl -w
use strict;
use 5.010;

while (<>){
print $_ if (m/[.]+/);
}
Empty file added chapter7/doubledNonWhitespace
Empty file.
22 changes: 22 additions & 0 deletions chapter7/fredTester.txt
@@ -0,0 +1,22 @@
1 fred
2 Fred
3 ffred
4 Ffred
5 frederick
6 Frederick
7 Alfred
8 AlFred
9 FRED
10 FReD
11 FREd
12 FrED
13 FreD
14 fRED
15 freD
16 Mr. Fred Flinstone
17 Dr. Fred Flinstone
18 ........
19 ..
20 _______.
21 a.a
22 .a.
7 changes: 7 additions & 0 deletions chapter7/mentionsFred
@@ -0,0 +1,7 @@
#!/usr/bin/perl -w
use strict;
use 5.010;

while (<>){
print $_ if (m/\b(?:fred)\b/);
}
7 changes: 7 additions & 0 deletions chapter7/mentionsFredOrfred
@@ -0,0 +1,7 @@
#!/usr/bin/perl -w
use strict;
use 5.010;

while (<>){
print $_ if (m/\b(?:[Ff]red)\b/);
}
Empty file added chapter7/wilmaAndFred
Empty file.

0 comments on commit a01108f

Please sign in to comment.