snippetjavascriptTip
Regular Expressions Cheat Sheet
Viewed 0 times
javascriptexpressionsregularcheatsheet
Problem
^: start of the string or the start of a line in a multiline pattern$: end of the string or the end of a line in a multiline pattern\b: word boundary\B: not word boundary (opposite of\b)
> [!NOTE]
Solution
\b: word boundary\B: not word boundary (opposite of\b)
> [!NOTE]
>
> Anchors are non-quantifiable (i.e. cannot be followed by a quantifier).
.: any character except line breaks
Context
From 30-seconds-of-code: regexp-cheatsheet
Revisions (0)
No revisions yet.