if (/(?:start|end)(\[*|\{*)abc\2:(.*)/.test(input)) console.log("Found the pattern.");