![](https://secure.gravatar.com/avatar/5615a372d9866f203a22b2c437527bbb.jpg?s=120&d=mm&r=g)
Feb. 15, 2022
8:53 a.m.
On Tue, Feb 15, 2022 at 05:39:33AM -0600, Tim Peters wrote:
([^s]|s(?!pam))*spam
Bingo. That pattern is easy enough to understand
You and I have very different definitions of the word "easy" :-)
(if not to invent the first time): we can chew up a character if it's not an "s", or if it is an "s" but one _not_ followed immediately by "pam".
It is times like this that I am reminded why I prefer to just call string.find("spam") :-) -- Steve