This feels really hacky, but I guess it'll do. There are unhandled edge cases like there not being a ) in the string, but I can't see that happening.  I probably would have done a regex replacement.