diff options
author | Dominic Hargreaves <dom@earth.li> | 2013-10-06 13:45:22 +0100 |
---|---|---|
committer | Dominic Hargreaves <dom@earth.li> | 2013-10-06 22:14:05 +0100 |
commit | c9dde69614295354a2345c602ba0aaf904361582 (patch) | |
tree | 9c7804646ba71aef5653a1c3ef5d905e33525d90 /pod/perlretut.pod | |
parent | 4387bc3c6899993ec4504edc3be8b5440ea61521 (diff) | |
download | perl-c9dde69614295354a2345c602ba0aaf904361582.tar.gz |
fix POD errors reported by newer pod2man
Diffstat (limited to 'pod/perlretut.pod')
-rw-r--r-- | pod/perlretut.pod | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/pod/perlretut.pod b/pod/perlretut.pod index 76522c6288..45d66b65c1 100644 --- a/pod/perlretut.pod +++ b/pod/perlretut.pod @@ -642,50 +642,50 @@ of what Perl does when it tries to match the regexp =over 4 -=item 0 +=item Z<>0 Start with the first letter in the string 'a'. -=item 1 +=item Z<>1 Try the first alternative in the first group 'abd'. -=item 2 +=item Z<>2 Match 'a' followed by 'b'. So far so good. -=item 3 +=item Z<>3 'd' in the regexp doesn't match 'c' in the string - a dead end. So backtrack two characters and pick the second alternative in the first group 'abc'. -=item 4 +=item Z<>4 Match 'a' followed by 'b' followed by 'c'. We are on a roll and have satisfied the first group. Set $1 to 'abc'. -=item 5 +=item Z<>5 Move on to the second group and pick the first alternative 'df'. -=item 6 +=item Z<>6 Match the 'd'. -=item 7 +=item Z<>7 'f' in the regexp doesn't match 'e' in the string, so a dead end. Backtrack one character and pick the second alternative in the second group 'd'. -=item 8 +=item Z<>8 'd' matches. The second grouping is satisfied, so set $2 to 'd'. -=item 9 +=item Z<>9 We are at the end of the regexp, so we are done! We have matched 'abcd' out of the string "abcde". @@ -1255,35 +1255,35 @@ backtracking. Here is a step-by-step analysis of the example =over 4 -=item 0 +=item Z<>0 Start with the first letter in the string 't'. -=item 1 +=item Z<>1 The first quantifier '.*' starts out by matching the whole string 'the cat in the hat'. -=item 2 +=item Z<>2 'a' in the regexp element 'at' doesn't match the end of the string. Backtrack one character. -=item 3 +=item Z<>3 'a' in the regexp element 'at' still doesn't match the last letter of the string 't', so backtrack one more character. -=item 4 +=item Z<>4 Now we can match the 'a' and the 't'. -=item 5 +=item Z<>5 Move on to the third element '.*'. Since we are at the end of the string and '.*' can match 0 times, assign it the empty string. -=item 6 +=item Z<>6 We are done! |