I'm not good with negative lookahead. What's wrong with this solution? I solved it myself, then I asked ChatGPT to solve it, and it came up with the same solution.
For more information, see the wiki Searching the Forum for Answers section.