Skip to content

Home

Regular Expressions Cheat Sheet

Anchors

šŸ’¬ Note

Anchors are non-quantifiable (i.e. cannot be followed by a quantifier).

Character sequences

šŸ’” Tip

Use \ to escape special characters (e.g. \, /, [, ], (, ), {, } etc.).

Quantifiers

šŸ’¬ Note

a is any valid quantifiable expression.

Groups

Flags

Note that this cheatsheet is meant only as a starting point and is by no means a complete guide to all the features and nuances of regular expressions. You can also read 6 JavaScript Regular Expression features you can use today for a deeper dive into some more advanced features.

More like this

Start typing a keyphrase to see matching snippets.