Capturing all segments of strings enclosed with double dollar signs $$, while ignoring any single dollar signs $.
$$
$
const re2 = "\\$\\$[^$]+\\$\\$"; let range = docBody.findText(re2);
Reference: