REGEX-Escape for: if (true) {

Your Input:
Result, the escaped string:
if \(true\) \{

What must the escaping look like for:
if (true) {

The excaped text for use in a regex is:
if \(true\) \{