Dup Goto 📝

RegExp

PT2/lang/js/regex 12-13 19:56:35
To Pop
9 lines, 45 words, 360 chars Wednesday 2023-12-13 19:56:35

The mozilla docs

const re = /ab+c/i; // literal notation
// OR
const re = new RegExp("ab+c", "i"); // constructor with string pattern as first argument
// OR
const re = new RegExp(/ab+c/, "i"); // constructor with regular expression literal as first argument