Escaping Parentheses in Regex December 9, 2023 by Tarik \) is the correct way for escaping a paranthesis. Make sure you are properly escaping the \(\\) in the string literal.