@@ -63,7 +63,7 @@ many examples. The first part of the tutorial will progress from the
6363simplest word searches to the basic regular expression concepts. If
6464you master the first part, you will have all the tools needed to solve
6565about 98% of your needs. The second part of the tutorial is for those
66- comfortable with the basics, and hungry for more power tools. It
66+ comfortable with the basics and hungry for more power tools. It
6767discusses the more advanced regular expression operators and
6868introduces the latest cutting-edge innovations.
6969
@@ -2462,10 +2462,10 @@ parentheses and the second alternative C<\([^()]*\)> matching a
24622462substring delimited by parentheses. The problem with this regexp is
24632463that it is pathological: it has nested indeterminate quantifiers
24642464of the form C<(a+|b)+>. We discussed in Part 1 how nested quantifiers
2465- like this could take an exponentially long time to execute if there
2466- is no match possible. To prevent the exponential blowup, we need to
2467- prevent useless backtracking at some point. This can be done by
2468- enclosing the inner quantifier as an independent subexpression:
2465+ like this could take an exponentially long time to execute if no match
2466+ were possible. To prevent the exponential blowup, we need to prevent
2467+ useless backtracking at some point. This can be done by enclosing the
2468+ inner quantifier as an independent subexpression:
24692469
24702470 $x =~ /\( ( (?> [ ^ () ]+ ) | \([ ^ () ]* \) )+ \)/xx;
24712471
0 commit comments