Files
OmniRoute/scripts/scratch/test-math-regex.js

4 lines
148 B
JavaScript

const re = /\$\$[^$]*(?:\$(?!\$)[^$]*)*\$\$/g;
const txt = "some text $$ a + b = c $$ more text $$ x + $y$ = z $$ end";
console.log(txt.match(re));