diff options
author | Karl Williamson <khw@cpan.org> | 2021-01-13 15:10:43 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-05-31 06:52:33 -0600 |
commit | 94d6a26c366bcfb5dbdcb83209f6b7098cb35991 (patch) | |
tree | 4656d3c04e59c320d04fe04382b82628b0a8bcd8 | |
parent | 43131e10b7e6fbdd31334ae0259411cead187801 (diff) | |
download | perl-94d6a26c366bcfb5dbdcb83209f6b7098cb35991.tar.gz |
perlretut: Grammar, clarifications, white-space
-rw-r--r-- | pod/perlretut.pod | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perlretut.pod b/pod/perlretut.pod index 2cb25c751c..5fe264ac85 100644 --- a/pod/perlretut.pod +++ b/pod/perlretut.pod @@ -63,7 +63,7 @@ many examples. The first part of the tutorial will progress from the simplest word searches to the basic regular expression concepts. If you master the first part, you will have all the tools needed to solve about 98% of your needs. The second part of the tutorial is for those -comfortable with the basics and hungry for more power tools. It +comfortable with the basics, and hungry for more power tools. It discusses the more advanced regular expression operators and introduces the latest cutting-edge innovations. @@ -2465,10 +2465,10 @@ parentheses and the second alternative C<\([^()]*\)> matching a substring delimited by parentheses. The problem with this regexp is that it is pathological: it has nested indeterminate quantifiers of the form C<(a+|b)+>. We discussed in Part 1 how nested quantifiers -like this could take an exponentially long time to execute if no match -were possible. To prevent the exponential blowup, we need to prevent -useless backtracking at some point. This can be done by enclosing the -inner quantifier as an independent subexpression: +like this could take an exponentially long time to execute if there +is no match possible. To prevent the exponential blowup, we need to +prevent useless backtracking at some point. This can be done by +enclosing the inner quantifier as an independent subexpression: $x =~ /\( ( (?> [ ^ () ]+ ) | \([ ^ () ]* \) )+ \)/xx; |