I know ChatGPT is great at regex but I don't know if I'm a fan of this answer. Especially in cases where you have multiple closing parentheses (see 1st screenshot). Maybe the 2nd pattern would be a bit safer (but it has issues as well) http