In pattern.txt, line 642, "aap" should be "app" as in line 635.
Because " a.\{-}p\@!" will not match "aap" as a whole, but it will fist match "a" and then match "ap".
Actually, the example as given in the text is correct, because it says it will match any of the examples not followed by a p. The given pattern can match aap and app as long as either is not followed by a p. Still, the text should be consistent with the example a few lines above. I corrected it for the website and will submit the change to the Vim documentation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually, the example as given in the text is correct, because it says it will match any of the examples not followed by a p. The given pattern can match aap and app as long as either is not followed by a p. Still, the text should be consistent with the example a few lines above. I corrected it for the website and will submit the change to the Vim documentation.