Okay so the problem ended up being much different than what I thought it was, but posting it for posterity.
The point of the regex is to lint CPP code, so for this sp