I really should have read the Java as I was translating instead just blindly converting (sometimes incorrectly) I also shold have just followed the C version for all regex usage since it would have been closer to go (re2 and all that jazz)