I am writing a tool to pick apart and analyze C++ files with lots of regexes. I have been slurping in the files and then splitting apart the functions by using split on \n\} . (Functions normally start with a flush left { and end with a flush left }). I found one file where there were two flush left }'s before the next flush right {. I am trying to figure out a way to search for this.
What regex can I use to search for where a \n\} is followed later by another \n\} without a \n\{ in between? I've tried to think of look ahead, look behind, both positive and negative, and can't come up with anything.
Any wisdom would be appreciated.