Regex Cheat Sheet (Javascript Edition)

I keep a lot of snippets on my work computer but the one I come back to the most is my regex cheat sheet. I find it so helpful that I’m posting it here for others to enjoy as well.

(Pasting in monotype to preserve markdown formatting)

==================
REGEXP CHEAT SHEET
==================

By @geochronology - https://github.com/geochronology

Methods
-------

## test()

Checks if regex matches var

Syntax: regex.text(var)

`myRegex.test(myString)`


## match()

Returns array of pattern matches
* Without /g…