๐ฐanchor
๐ง under construction
JS โฉ value โฉ object โฉ regex โฉ pattern โฉ 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
Was this helpful?