break the code to first opening parenthesis and then closing use the groups individually not entirely . This is 40% correct online pattern but mixing it with first open then close groups in two different matches result in 100% success