🔰anchor

🚧 under construction

JSvalueobjectregexpattern ⟩ anchor

anchors match the position between characters, not the characters themselves

^    beginning anchor    start of string/line
$    end anchor          end of string/line
\b   word boundary       position between \w\W or \W\w
                         (also matches start/end of line)
\B   non-word boundary   position between a \w\w or \W\W
/cat/.test("concatenate")        // true
/\bcat\b/.test("concatenate")    // false

Last updated