How can I make this pattern work in python
(.)\1(?!\1)
I want to use this pattern to find
"aa" in the string
"aabccc" but not "ccc"